-
Notifications
You must be signed in to change notification settings - Fork 154
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 not building magit-version.el #520
Comments
related: #72 |
That doesn't sound correct to me. I installed Magit using |
Also, #72 isn't supported by |
Perhaps I was mistaken. I didn't get to look into it too deeply, but I did notice that the file only exists as part of the make process and is removed if it still exists afterward by the Apologies if this is just noise. |
Maybe @tarsius can explain how the package manager is supposed to build |
Duplicate of #480. That is labeled as In the ideal case we can determine the exact version in use:
We cannot do that when not running Magit from its Git repository. When we create a release tarball then we bundle a In a shallow clone Git isn't of any help:
When installing using It appears we have to do the same for |
Straight does not normally use a shallow clone. I think the issue is that the load path for magit points to the build directory which is not a git repo and only contains the byte-compiled code. Therefore getting the version from the tag doesn’t work. If we could point the |
Okay, I just tested and with the following init-file (defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(straight-use-package 'magit) the command
So I suspect there is something else going on in your configuration @CeleritasCelery. Now for shallow clones, I agree there's not much can be done on the side of Magit. However, I'm not quite sure @tarsius why the lack of version information should produce a warning at startup/byte-compilation. Why not just report "version info unavailable" or generate a warning at the time that I think the reason I marked #480 as |
Your minimal setup works on linux, but not on windows. I still get Cannot determine Magit’s version (error "c:/Users/cel/AppData/Roaming/.emacs.d/straight/build/magit/magit.el" repo static elpa dirname) |
Had the same problem with magit and Same problem (and solution) with org, without a full clone I kept getting:
|
Well to be honest, I sometimes wonder too. The idea is that when a user is experiencing some (other) issue and it happens to be relevant what version they are using, then it would be nice not to have to first figure out why the version cannot be determined. On the other hand we get quite a few issues about this harmless little warning, which is unfortunate considering it's supposed to reduce work. Then again, every time we add some additional code to handle yet another method to install magit, we got that method going forward. So maybe it is a win after all. |
Would you be okay with magit-version reporting |
Just the hash would be better but make sure we only do that when straight was actually used to install magit. |
magit/magit@b1b2683 fixes the issue for macOS and Linux users, but not Windows users it seems. Presumably because straight doesn't (can't) use symlinks on Windows, so magit can't chase links in its |
Magit complains loudly (but harmlessly) when it can't determine its own version in a sparse clone. This was fixed upstream in magit/magit@b1b2683 for unix OSes, but not for Windows where symlinks aren't supported, and so `magit-version` can't resolve its own repo's root (see radian-software/straight.el#520).
That's really tragic. For context, Here is one way to solve the problem. I could add another case to
|
I would merge that. 😁 |
Okay, I created the relevant pull request. This should solve the last remaining case for this ticket. |
Add a new function `magit--straight-chase-links' to do so. Closes radian-software/straight.el#520.
Add a new function `magit--straight-chase-links' to do so. Closes radian-software/straight.el#520.
Thanks for the pr. |
What's wrong
as described in magit/magit#2070, the package manager should be building
magit-version.el
but straight is not. This is leading to the errorDirections to reproduce
run
(magit-version)
after loading the package with straight.Version information
The text was updated successfully, but these errors were encountered: