straight.el
straight.el copied to clipboard
Stuck at Looking for emacsmirror-mirror recipe -> Cloning non-gnu-elpa
Emacs is freezes on startup with the following message appearing in the echo area:
Looking for emacsmirror-mirror recipe -> Cloning non-gnu-elpa
I've tried to set the straight-recipes-emacsmirror-use-mirror
to t
but still that doesn't change anything. still stuck at the same issue.
Happens to me as well.
I've tried to set the straight-recipes-emacsmirror-use-mirror to t but still that doesn't change anything
This variable is for retrieving Emacsmirror packages via a mirror. It will not change how (non)GNU-ELPA packages are retrieved.
We have straight-recipes-gnu-elpa-use-mirror
for GNU-ELPA, but that will not effect NonGNU-ELPA.
Can either (or both of you) please provide as much of the information requested in the bug report template? Any error messages and the contents of *straight-process-buffer*
are appreciated as well.
I suspect this may be a duplicate of #994
I can confirm that after leaving it for around 9 minutes, it works. It is just longer than I had expected. I don't recall having to wait this long when I used it, only because recently I nuked my .emacs.d
directory so I had to go through this again.
I discovered this by accident. I realised that straight/
(after installation) is around 432 MB. Inside straight/repos/
, nongnu-elpa/
is around 317 MB. This should pretty much explain the issue why emacs seems "stuck" at cloning nongnu-elpa.
For your information, this is the contents of straight/repos/nongnu-elpa/
$ du -sh $(ls -A)
317M .git
4.0K .gitignore
36K COPYING
4.0K Makefile
12K README.org
4.0K elpa-config
28K elpa-packages
4.0K packages
The issue, I think, is that by default, straight uses --no-single-branch
to clone the entire repo. In the case of nongnu-elpa, the repo contains a copy of the code for all packages included in the repo, each in its own detached branch. Cloning with --no-single-branch
fetches (all the history) for all the code in all the packages listed in the index. Rather, we are interested in the main
branch which contains just the package index data.
Details about this are documented in the README for the repo.
Adding the following (before the straight
bootstrapping code) to my init.el seems to fix the issue for me.
(setq straight-recipe-overrides
'((nil (nongnu-elpa :type git
:repo "https://git.savannah.gnu.org/git/emacs/nongnu.git"
:depth (full single-branch)
:local-repo "nongnu-elpa"
:build nil))))
The key here is the :depth (full single-branch)
, which causes just the default (main
) branch to be cloned. (Total cloned repo size with --single-branch
is 384k, rather than 335M when cloned with --no-single-branch
.)
I don't know enough to say whether forcing single-branch
might cause other problems. If not, I expect that adding :depth (full single-branch)
to the recipe definition for nongnu-elpa in bootstrap.py would fix this.
I had this issue a full days ago (and on elpaca which I think does just take the latest version) . When I deleted all of the items in straigh ie the repos and builds it just worked.
Github had an outage the previous day and I wonder if something was corrupted on the mirror and then downloaded to my machine.
My question would be why is straight loading from the internet unless I tell it to do.
Ugh. This is exactly why I don't like GNU ELPA and related projects. They always end up needing special handling and do not degrade gracefully when processed by automated tooling.
Looking at the typical format of NonGNU ELPA recipes for straight.el
, it seems like single-branch cloning should be a fine optimization. I will push a commit incorporating the fix suggested by @dairiki.
Re @bestlem - straight.el
will clone a repository if and only if a requested package is configured to come from a repository that hasn't been cloned already.