From 093488fcb7c620a4a62734389c2a00c8380119aa Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 22 Sep 2025 22:19:00 -0400 Subject: [PATCH] fix(lib): dependence on hash-table insertion order Yes, yes. I did a stupid here. I depend on the order of a hash table, and sure enough, that came back to bite me when that changed internally in Emacs 29. In practice, this meant packages were getting installed/rebuilt in reverse order, which, besides some odd output during 'doom sync' for users on 29+, didn't pose any overt issues, but may have caused strange, inexplicable byte-code warnings/errors. But, rather than do the smart thing and *not* do this, I do the next best thing: procrastinate! Because the solution is non-trivial (I don't control the hash table in question) and this is precisely the sort of technical debt I've fixed in v3, and I'd really, *really* rather beat my head on that wall, rather than this one. --- lisp/lib/packages.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/lib/packages.el b/lisp/lib/packages.el index 87a6d164b..5d3f8b982 100644 --- a/lisp/lib/packages.el +++ b/lisp/lib/packages.el @@ -415,7 +415,10 @@ also be a list of module keys." (unless (or (null local-repo) (eq type 'built-in)) (push recipe recipes)))) - (nreverse recipes))) + ;; FIXME: Depending on a hash table's load order? Straight to jail. + (if (< emacs-major-version 29) + (nreverse recipes) + recipes))) ;;;###autoload (defun doom-package-homepage (package)