8
8
#+HTML: <a href="https://github.com/positron-solutions/elisp-repo-kit/actions/?workflow=CI"><img src="https://github.com/positron-solutions/elisp-repo-kit/actions/workflows/ci.yml/badge.svg" alt="CI workflow status"></a>
9
9
#+HTML: <a href="https://github.com/positron-solutions/elisp-repo-kit/actions/?workflow=Developer+Certificate+of+Origin"><img src="https://github.com/positron-solutions/elisp-repo-kit/actions/workflows/dco.yml/badge.svg" alt="DCO Check"></a>
10
10
11
+ This repository is a kit to start a new elisp package repository. The package
12
+ contained has commands to streamline elisp development.
13
+
11
14
* Quickly set up an Emacs Lisp repository on Github with:
12
15
13
16
- An [[https://www.youtube.com/watch?v=RQK_DaaX34Q&list=PLEoMzSkcN8oPQtn7FQEF3D7sroZbXuPZ7][elisp]] package
14
17
- Bytecode compiling, linting, and test running
15
18
- Commands to handle common elisp development gotchas
16
19
- CI with [[https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs][Github Actions]], configured for Darwin (MacOS) and Linux
17
- - [[https://nixos.org/#examples][Nix]] environment for obtaining dependencies or
18
- reproducibly developing CI locally
20
+ - [[https://nixos.org/#examples][Nix]] environment for obtaining dependencies or reproducibly developing CI
21
+ locally
19
22
- Licensing, [[https://developercertificate.org/][DCO]], and DCO sign-off checks for PR's
20
23
- [[https://github.com/melpa/melpa][MELPA]] publishing compatible
21
24
@@ -52,6 +55,7 @@ answer all the questions.
52
55
53
56
- Root directory you want to clone to
54
57
- Package name
58
+ - Package prefix
55
59
- Author name
56
60
- Github user or organization
57
61
- Email address
@@ -174,13 +178,18 @@ answer all the questions.
174
178
175
179
*** Manual Loading & Reloading
176
180
181
+ To manually unload, run built-in command ~unload-feature~ and select your
182
+ package name. If you do not unload, reloading has no effect and you will see
183
+ stale behavior.
184
+
185
+ Next, add the package to your load-path and then require it or, more
186
+ directly, call =emacs-lisp-byte-compile-and-load= or
187
+ =emacs-lisp-native-compile-and-load=.
188
+
177
189
Especially in bootstrap situations such as working on this package itself,
178
190
you cannot unload the package in the middle of a command. Some commands
179
191
have a =no-reload= variant just for this circumstance.
180
192
181
- Call ~unload-feature~ and select your package name. If you do not unload,
182
- reloading has no effect and you will see stale behavior.
183
-
184
193
When using locally installed packages such as with straight,
185
194
=straight-rebuild-pacakge= will rebuild but *not* reload.
186
195
@@ -429,7 +438,7 @@ answer all the questions.
429
438
can also set the signature flag this way.
430
439
431
440
**** Automatic GPG signing with per-project keys
432
-
441
+
433
442
In order to specify which projects you intend to sign with which keys, you
434
443
will want to configure your git client using path-specific configurations.
435
444
@@ -492,44 +501,57 @@ answer all the questions.
492
501
493
502
* Package scope and relation to other work
494
503
495
- This repository mainly captures the annoying work necessary to set up a new
496
- repository with everyting working. By focusing on just one minimal task,
497
- cloning itself and renaming, there is very little work a user will need to
498
- identify and remove to reach the clean foundation.
504
+ There are two functional goals of this repository:
505
+
506
+ - Automate the annoying work necessary to set up a new repository
507
+ - Streamline common elisp development workflows
499
508
500
509
Commands within this package will focus on cleaner integration of the tests and
501
510
lints with Emacs. There has been a lot of work in this area, but much of it is
502
- tangled with dependency management and sandbox creation.
511
+ tangled with dependency management and sandbox creation. Much of the work is
512
+ done in languages other than elisp and focused on non-interactive workflows
513
+ with no interactive integration on top.
503
514
504
- ** Dependency Management
515
+ Providing close to out-of-box CI is a big focus. By making it easier to
516
+ qualify changes from other users, it becomes less burdonsome to maintain
517
+ software, and by extension, less burdensom to publish and create software. The
518
+ effect is to drive creation of elisp in a way that can accelerate the flow of
519
+ elisp into Emacs itself.
505
520
506
- Many tools for testing Emacs packages provide dependency management and loading
507
- those dependencies into a fresh Emacs instance. This package will never attempt
508
- to manage dependencies. Dependencies will always be expressed through the Nix
509
- flake expressions and at most a lock file describing a frozen set of Emacs
510
- dependencies.
521
+ ** Dependency Management
511
522
512
- Use of the [[https://github.com/nix-community/emacs-overlay][Emacs Nix Overlay]] is a simple way of stating and obtaining elisp
513
- dependencies for now. Non-elisp dependencies are trivially provided form
514
- nixpkgs. Nix is extremely reliable at dependency management, and it is no
515
- surprise that much complexity is normalized away by just the basic behavior
516
- model of Nix. In addition, *if your project needs or includes additional binary
517
- dependencies or modules*, Nix is an excellent way to provide them to CI and
518
- users.
523
+ This repository uses pure dependency management and then levarages it to
524
+ provide dependencies for development and CI environments. The resulting user
525
+ experience is built around CI for reproducibility and interactive testing for
526
+ development speed.
527
+
528
+ Because most elisp dependencies can be obtained without extensive system
529
+ dependency management, many tools for testing Emacs packages provide
530
+ dependency management and loading those dependencies into a fresh Emacs
531
+ instance. This aligns well with ad-hoc sandboxed local testing. This was
532
+ fine in the old days of impure dependency management and dirty environments.
533
+
534
+ The [[https://github.com/nix-community/emacs-overlay][Emacs Nix Overlay]] and Emacs support within nixpkgs make it possible to
535
+ stating and obtaining elisp dependencies in a completely pure way. Non-elisp
536
+ dependencies are trivially provided form nixpkgs. Nix is extremely reliable
537
+ at dependency management, and it is no surprise that much complexity is
538
+ normalized away by just the basic behavior model of Nix. In addition, *if
539
+ your project needs or includes additional binary dependencies or modules*,
540
+ Nix is an excellent way to provide them to CI and users.
519
541
520
542
** Discovering and Running Tests & Lints
521
543
522
- This repository uses very bare elisp that can be run with just one Emacs switch
523
- in most cases. The Makefile merely exposes this interface with the even more
524
- familiar make style of user interaction .
544
+ During development, the commands provided under the =erk-= prefix make it
545
+ more convenient to reload your package and test features. You can run the
546
+ ert tests for a project while working on multiple packages .
525
547
526
- The CI scripts are arranged to present a useful environment first. The commands
527
- to invoke tests follow. If the commands need to be changed, it is
528
- straightforward to change them /independently of how you provide dependencies/.
529
- Just be sure to propagate changes to the Makefile and README of your project.
548
+ During CI, this repository uses an elisp shim for discovering and running
549
+ tests. The commands within the package for convenience during development
550
+ are not depeneded upon during CI.
530
551
531
- Future versions of this project will continue to favor elisp scripts for test
532
- discovery and integration with Emacs. Make and bash will be minimized.
552
+ The CI actions obtain an environment with dependencies using Nix, so this can
553
+ also be done locally using Nix, meaning re-creating environments is available
554
+ to the user without leaning on CI.
533
555
534
556
** Comparisons
535
557
@@ -556,23 +578,26 @@ answer all the questions.
556
578
* Contributing
557
579
558
580
First decide if you want to work on this repository or fork it to something
559
- entirely different. Non-exhaustive list of changes that are very welcome:
581
+ entirely different.
582
+
583
+ Non-exhaustive list of changes that are very welcome:
560
584
561
- - To the maximum degree possible, this project should lean on elisp as a CLI
562
- script backend
563
- - Running additional kinds of tests
564
- - Running additional lints
585
+ - More interactive integrations with high-value elisp development workflows
586
+ - Running additional or better kinds of tests & lints
565
587
- Fix bugs
566
588
- Expose trivial options where a structural choice has limited them
567
589
unnecessarily
568
590
- Behave the same, but with a less complicated code
569
- - Guix support
591
+ - Guix or other pure dependency management support
570
592
571
593
Changes will likely be rejected if it is aimed at:
572
594
573
- - Managing dependencies outside of Nix expressions other than a package that is
574
- supposed to manage dependencies or test obtaining dependencies in a
575
- user-present use case
595
+ - Non-elisp interfaces meant for invocation outside of Emacs or with scripting
596
+ implemented in a language besides elisp.
597
+ - Managing dependencies outside of Nix (or other pure dependency management)
598
+ expressions
599
+ - CI infrastructure support for non-Actions infrastructure (which cannot be
600
+ tested in this repo)
576
601
- Backwards compatibility for Emacs two versions behind next release. Master,
577
602
current stable release, and release - 1 are the only versions being supported
578
603
- pre-flake Nix support
0 commit comments