Skip to content
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

PR #259 breaks startup #262

Closed
jkl1337 opened this issue Feb 15, 2024 · 4 comments · Fixed by #264
Closed

PR #259 breaks startup #262

jkl1337 opened this issue Feb 15, 2024 · 4 comments · Fixed by #264

Comments

@jkl1337
Copy link
Contributor

jkl1337 commented Feb 15, 2024

The commit in PR #259 has a number of problems and breaks emacs startup in most cases especially if using something like straight.el.

  • package-get-descriptor is emacs 28.1 and above, so the Package-Requires should be updated. (Suggest using package-lint to avoid this).
  • (require 'package) is missing so compilation breaks.

More troublesome is that package-get-descriptor only works if the descriptor is fetched and loaded, they do not need to be loaded normally to use/require a package.
Is there a way to test for the needed features without pulling package metadata?

@jcs090218
Copy link
Member

jcs090218 commented Feb 15, 2024

Sorry about this. I've opened the fix in #260. Can you see if it works?

@jcs090218
Copy link
Member

The commit in PR #259 has a number of problems and breaks emacs startup in most cases especially if using something like straight.el.

I am a little confused. straight.el is not the standard way to load Emacs packages, and it should at least handle things like this (compatible to package.el)? Or else, packages would have to include (require 'package) everywhere. 🤔

@jkl1337
Copy link
Contributor Author

jkl1337 commented Feb 15, 2024

Sorry, those are two different issues.
The reference to straight.el is just pointing out that packages are not necessarily going to come from ELPA so package-get-descriptor is not going to work.

(require 'package) is needed because you are using a package library provided function (package-get-descriptor or package-get-version) in the fixed version.

@jcs090218
Copy link
Member

jcs090218 commented Feb 15, 2024

The reference to straight.el is just pointing out that packages are not necessarily going to come from ELPA so package-get-descriptor is not going to work.

Got it! I've removed it.

(require 'package) is needed because you are using a package library provided function (package-get-descriptor or package-get-version) in the fixed version.

I've added the (require 'package). I believed this is best practice since we are using some of functions in this module.

Thank you for your report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants