-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deal with reworked Doom initialization #39
Comments
doomemacs/doomemacs@8cafbe4 breaks us in a way that does not look trivial to fix, and further changes are incoming. Allow CI to update our other inputs while we wait for those changes to land. See #39.
doomemacs/doomemacs@b3aa41f will require further changes on my part, but those changes will be unrelated to the initialization ones. So it's starting to look like a piecemeal migration will be easier after all. I'll give it a bit more time for things to settle before tackling that. |
I'll have to deal with this soonish (next couple of days if possible): CI (which has been failing for a bit because of NixOS/nixpkgs#353702, I was waiting for that change to make it into nixpkgs-unstable...) is now failing because the use-package repo moved. Doom just fixed that with doomemacs/doomemacs@ef33cb3, and although I could pin to the same revision in our fetch-overrides.nix I don't want to go down that path... |
Progress:
|
ff9ea90 brings us back up-to-date (assuming it passes tests, which it should as it passed them locally). I'll push that to main after https://nixpk.gs/pr-tracker.html?pr=356505 reaches the nixos-24.11 channel (CI only covers nixpkgs-unstable, been meaning to fix that...). |
I'm using 07aa2a8 and it appears to work for me. Thanks for the work on this! |
Thanks for testing! Glad to hear org-roam works now (I knew it was broken, wasn't sure it was entirely fixed). Unfortunate timing there, with those emacsql changes around the same time as the Doom initialization changes... Still waiting for that emacsql fix to reach nixos-24.11 (I don't understand nixpkgs build/release well enough to predict how long that'll take...). |
Good news: the emacsql fix reached nixos-24.11, so I pushed the changes to main. Bad news: doing so revealed org-roam v1 (aka @zarthross maybe you can help me understand if asking people to upgrade to org-roam v2 is reasonable? Doom has described org-roam v1 as "basically EOL" since 2021, and although it does mention v2 is a full rewrite with a need to migrate your data, I'm having trouble quickly working out how different v2 is to use once you're past that. Is this a "you have to retrain your brain and fingers to use the new thing" situation or more of a "people might want to wait for the new thing to stabilize first" (which it hopefully has in the past 3 years)? (I'll see if I can fix org-roam's build, but with upstream dead and emacsql changing underneath it I'm a little worried this won't be sustainable) |
I think org-roam v1 just hasn't worked since around 2023-04-03, when the emacs-sqlite3 package was dropped from MELPA (and as a result from nixpkgs). At first glance it is not possible to use org-roam-v1 without that (its org-roam-db.el hard-depends on it). So I think all that changed is that the build error became fatal, and "just don't buid org-roam v1" is reasonable (...although implementing that is unfortunately going to be a bit clunky, as (...I wonder if this is outright broken for normal Doom users as well? If it is, and I can get org-roam-v1 dropped there, that'd simply things. Should test that once I have things papered over...) |
...nope, Doom pulls a recipe for emacsql-sqlite3 from emacsattic. So it probably does still work for them. For now I'll keep it disabled unless someone speaks up. It looks fixable but not trivially: I can use that emacsql-sqlite3 recipe, but the way my |
Sorry, I'm a recent convert into org-roam, started directly onto v2 just a few weeks ago. But from what I've read its possible to migrate, but could take an hour or two with manual work to do so. If someone would rather stay on old, outdated and deprecated versions, I would say they can submit a PR here to fix it... but even then its likely a waste of time, since it appears to be slated for removal from Doom itself https://github.com/orgs/doomemacs/projects/5/views/1?filterQuery=-status%3ARejected%2CDone+roam |
Thanks for checking! That doesn't sound worth spending time on, so I'll close this off. |
doomemacs/doomemacs@8cafbe4 makes some changes to Doom's startup process that breaks how Unstraightened hooks into that process. I'm not sure yet how to deal with this.
Previously, Doom's early-init.el would load doom-start.el, which would load
$DOOMDIR/init.el
early. It would do so relative todoom-user-dir
, which we control (by setting DOOMDIR to a store path): we use this to load Unstraightened's init.el (which loads the user's real init.el). It then loads the profile's init.29.elc, relative todoom-profile-dir
, which we also control (either because we setdoom-profile-data-dir
in the profile loader and Doom initializeddoom-profile-dir
relative to that, or because we set it ininit.el
).The changes in that commit include (assuming I read everything correctly):
(doom-profile-init-file doom-profile)
, which always returns a path relative todoom-data-dir
. We can't overridedoom-data-dir
, it's used to store all kinds of mutable data. We were already overriding (using advice)doom-profile-init-file
, however...$DOOMDIR/init.el
from the profile init file (doom-profile-generate
includes(doom-load (file-name-concat doom-user-dir "init.el") t)
as one of the first things in the profile init file). That means ourdoom-profile-init-file
advice is installed too late to fix the problem (catch-22).Short of "patch Doom", I think that leaves me with the profile loader as the only point to gain control early enough. Possible approaches:
But I'm going to hold off for a week or so: the new code contains some intriguing references to a
doom-profile
struct (which presumably exists in Doom 3.0), and the commit message mentions one more Doom 3.0 backport is incoming. I'm expecting that next backport to further break Unstraightened (because it'll changedoom!
blocks, which is fairly likely to break my dumping of the user's init.el), but it just might also include more ways of overriding profile-related paths from the profile loader. It might turn out to be easier to update directly to that state than do this in stages (and if not, I can still update in stages, just delayed).The text was updated successfully, but these errors were encountered: