Skip to content

Releases: progfolio/elpaca

v0.2.0

23 May 23:33

Choose a tag to compare

Breaking Changes

  • Replaced elpaca--singal with elpaca-note, and elpaca--continue-build with elpaca-continue.

Core & Event System Updates

  • Pub-Sub Event Model: Implemented a more flexible pub-sub event system and conditional blockers to decouple logging and build logic. This resolves long-standing package blocking issues and introduces elpaca-queue-start-functions and elpaca-queue-finish-functions.

  • Error Handling: Enhanced debugging by ensuring quick failures if a build error handler fails, rather than propagating the error.

  • Edebug Declarations: Improved macro debug specifications. (Contributed by @Stebalien and @TOTBWF)

Git & Mono-Repo Optimizations

  • Deadlock Fixes: Resolved mono-repo deadlocks by ensuring the system does not block a shared source directory if the source directory is already on disk.

  • Build Adjustments: Modified elpaca-build-steps to build on merge, which also covers :pull actions. (Contributed by @Stebalien)

UI & Interactive Improvements

  • Dynamic Progress Bar: Status counts on the progress bar are now dynamic.

  • Recipe Declarations: Improved interactive usage for elpaca-menu-item and elpaca-recipe to copy items/recipes as declarations for easy pasting. Raw forms available via prefix argument.

Bug Fixes

  • Fixed multiple typos across elpaca-source-dir, elpaca-build-docs-process-sentinel, and elpaca-build-link (specifically correcting oprhan to orphan, elpaca--isntall-info to elpaca--install-info, and recusrive to recursive) which previously caused dead code or unintended behavior after compilation failures. (Contributed by @diamond-lizard)

  • Fixed the :not build step syntax for the Org Mode recipe. (Contributed by @TOTBWF)

  • Resolved search direction issues in elpaca--shared-source-dir.

  • Fixed ANSI escape sequences appearing in logs by stripping them during filtering.

Full Changelog: v0.1.0...v0.2.0

v0.1.0

07 Mar 02:50

Choose a tag to compare

Features

  • Elpaca has been refactored to offer a generic interface.
    This means Elpaca can be extended to install different types of packages.
    Preliminary support for tarball and local file installations has been added.
    Git support has been moved into its own sub-package.

  • Elpaca's use-package integration now accepts the :vc use-package keyword as well as :straight, :elpaca. Most recipes from package author README's should "just work".

  • Elpaca now throws custom error signals where appropriate.
    There is a per-recipe :on-error for handling errors.
    Example: (:on-error (lambda (e err) (message "skipping optional package...") t))

  • There's also a global elpaca-error-functions hook to handle top-level errors.
    For example, If a package you're interested in has recently been added to an ELPA, but you haven't updated your menus since then, you can extend Elpaca to offer to refresh its menu cache:

        (elpaca-test
          :interactive t
          :early-init (setq elpaca-menu-functions '(elpaca-menu-declarations elpaca-menu-melpa))
          :init
          ;; Simulate a menu item not being avaialable in menu cache
          (elpaca-update-menus 'elpaca-menu-melpa)
          (setf (alist-get 'doct elpaca-menu-melpa--index-cache nil 'remove) nil)
        
          (defun +elpaca-update-menus-on-fail (e err)
            "Offer to update menus when a recipe URL is unable to be determined."
            (when (and (eq (car err) 'elpaca-url-error)
                       (yes-or-no-p
                        (format "Unable to resolve URL for package %S. Update default menus?"
                                (elpaca<-id e))))
              (elpaca-update-menus)
              (elpaca-try (elpaca<-declaration e))
              t))
          (add-hook 'elpaca-error-functions #'+elpaca-update-menus-on-fail)
        
          ;; Since we removed the recipe from the menu cache above, this would normally error.
          ;; With the handler, we can recover and install the package.
          (elpaca doct))
  • Hook functions on elpaca-order-functions and elpaca-recipe-functions are now composable rather than short-circuiting, allowing multiple hooks to cooperate.

Breaking Changes

  • The elpaca-installer script has been updated.
    Make sure you've updated it in your init file prior to restarting after updating.

  • Anything git specific has been renamed.
    (e.g. elpaca-repos-dir has been renamed to elpaca-source-dir)

  • Variables marked obsolete during development (e.g. elpaca-use-package-by-default) have been removed.

  • elpaca-menu-non-gnu-elpa renamed to elpaca-menu-nongnu-elpa.

  • Most build step functions have been renamed to make custom :build steps easier to write.

  • Several internal functions have been renamed : repo<-dir slot renamed to source<-dir.

  • :pre-build and :post-build recipe keywords replaced by a new :build step substitution DSL.
    The new elpaca-defscript and elpaca-with-emacs macros provides a cleaner way to define custom shell or elisp build scripts.
    For example, the following recipe installs the mu4e binary and configures my mailboxes:

        (elpaca `(mu4e
                  :build
                  ((:before elpaca-check-version
                            ,(elpaca-defscript +mu4e-build-binary (:type system)
                               ("bash" "-c" ". ./autogen.sh -Dtests=disabled")
                               ("ninja" "-C" "build")
                               ("ln" "-sf" ,(expand-file-name "./build/mu/mu") ,(expand-file-name "~/bin/mu"))
                               ("mu" "init" "--quiet" "--maildir" ,(concat (getenv "HOME") "/Documents/emails")
                                "--my-address=" ,(+email-address +email-personal)
                                "--my-address=" ,(+email-address +email-work)
                                "--my-address=" ,(+email-address +email-dev))
                               ("mu" "index" "--quiet")))
                   (:not elpaca-build-compile))))
And this example tangles a literate Org project to its elisp source files:
        (elpaca-test
          :interactive t
          :early-init (setq elpaca-menu-functions '(elpaca-menu-extensions))
          :init
          (elpaca-defscript +org-tangle-package (:type elisp)
            (require 'ob-tangle)
            (setq org-confirm-babel-evaluate nil)
            ;; Main process state injected into sub-process via back-quoting.
            (org-babel-tangle-file ,(concat (elpaca<-package e) ".org")))
          (elpaca (miscellany
                   :host github :repo ("progfolio/miscellany.el" . "miscellany")
                   :protocol ssh
                   :build (:after elpaca-source +org-tangle-package))))

For no extra charge, I've thrown in some bugs as well. :)