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

Report warning when built-in package gets shadowed #1148

Open
raxod502 opened this issue Feb 17, 2024 · 3 comments
Open

Report warning when built-in package gets shadowed #1148

raxod502 opened this issue Feb 17, 2024 · 3 comments

Comments

@raxod502
Copy link
Member

See #1146 (comment).

There might be a more comprehensive solution to avoid this situation of multiple package versions happening in the first place, but it is a simple improvement for everyone if we report a warning when we detect that the situation has happened.

@tomrss
Copy link

tomrss commented Apr 20, 2024

@raxod502 in addition to the warning, I suggest adding the possibility to exclude pulling in certain package dependencies.
Something like this:

(straight-use-package 'eglot-java
   :exclude-dependencies (eglot jsonrpc))

In my opinion, this can be very useful to:

  • avoid pulling unnecessary packages that are already built-in
  • resolve nasty dependency conflicts, in more general cases than only built-in packages
  • protect against packages with ill defined dependencies

Also, this feature is implemented in notable package managers like npm, maven, apt, pip (not real package manager, but still) and also guix, that is like straight a functional package manager.

Honestly I'm struggling with this from a while, I had to drop every package that depend on built-in packages with Emacs 30.

@raxod502
Copy link
Member Author

As a workaround, you should be able to stub out any package by registering or overriding it with a :type built-in recipe

@tomrss
Copy link

tomrss commented Apr 26, 2024

Very useful, thanks for the advice!

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

No branches or pull requests

2 participants