-
Notifications
You must be signed in to change notification settings - Fork 152
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
straight.el does not find updated recipes when updating&freezing their repos #292
Comments
There are definitely problems with the UX of moving lockfiles between machines (what is really needed is a way to start Emacs with a command-line flag saying "please normalize and update packages as you go, instead of loading the old versions"), but I think that your particular steps for reproduction result in expected behavior. In step 2, how are you adding the package to the init-file if the recipe isn't yet available in that machine's copy of MELPA? If you are writing a lockfile, it should mean that all the packages are currently using correct revisions. You seem to want recipe repositories to be pulled automatically. I don't think this is the correct solution. Instead, there should be a way to automate the following steps for updating an Emacs configuration using
Because as you have noticed, if you don't perform all of these steps, then you may find errors during startup. This is really annoying, frankly, and a big problem for UX. But I don't really think automatic updates is the correct solution—after all, other breakage can also result if all the packages aren't reset to the versions in the lockfile. |
Oh, ok, I think my repro steps weren't super clear then: I don't want that at all (-: The way I usually go about pulling in a new package is:
That means now my frozen versions have updates to both the What I'd like is for straight to update packages from the frozen file in two steps on startup: First it should update to the frozen version those packages that it already has a recipe for; then try to fetch new ones. Does that make more sense? |
I think what you are missing is running I think that there should be a way for But maybe your real problem is that |
Maybe you're expecting |
Aha, ok, I think that's exactly where I was wrong - this isn't super clear from the docs, and I think my main confusion stems from straight downloading packages on startup that I added to the init file (and failing for the packages that aren't available in the recipe repos that are currently checked out). I think I can make my workflow work this way, but I've found a separate weird interaction trying out this normalize/fetch/thaw flow:
From your description, I would expect a freeze after a thaw to be a no-op. But if I check the diff on the frozen versions file, it shows that freezing reverted back to the versions that were checked out previously (my canary is I tried restarting emacs a few times between thaw and freeze, but it's the same behavior every time - freeze reverts frozen versions to the versions that were checked out previously. |
What you describe sounds like a bug. I don't see any problem with your steps. Do you think you can provide a minimal init-file and lockfile that reproduce the problem? |
Actually, it would be best if you could open a new issue about that bug, so we can leave this one for discussion of documentation improvements :) |
I've just narrowed down a weird problem I've had with straight.el for a little while: I keep my emacs config in sync between two machines using git & frozen versions via straight. Every so often, I'll add a new package (recently,
eglot
anddeadgrep
) on one machine, and then when I check out the configuration on the other machine, emacs will refuse to start up because it can't find the recipe in any of the recipe packages. This seems to happen more often to things that sort alphabetically before straight's recipe repos (melpa
,emacsmirror
, etc).Steps to reproduce:
melpa
that's checked out (we'll use that to simulate transporting the emacs config across the network) - let's say the version is7726fcef0525bb50b313c6e7ef10fa5b16e12101
melpa
(that is, it is not in the version of melpa that's frozen) - let's pickdeadgrep
.rm -rf ~/.emacs.d/straight/{repos,build}/deadgrep/
melpa
in its repo dir & delete its build dir:(cd ~/.emacs.d/straight/repos/melpa && git reset --hard 7726fcef0525bb50b313c6e7ef10fa5b16e12101) && rm -rf ~/.emacs.d/straight/build/melpa
Result:
Emacs fails to load the init file, saying:
error: Could not find package deadgrep in recipe repositories: (org-elpa melpa gnu-elpa emacsmirror)
Workaround:
M-x straight-pull-package RET melpa RET
Expected result:
Straight should pull
melpa
and the other recipe repos first to match the frozen versions, then attempt to install new packages / new versions of other packages.The text was updated successfully, but these errors were encountered: