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

package-initialize fixes "Package X is not installable" errors #153

Open
twmr opened this issue Nov 28, 2019 · 8 comments
Open

package-initialize fixes "Package X is not installable" errors #153

twmr opened this issue Nov 28, 2019 · 8 comments

Comments

@twmr
Copy link

twmr commented Nov 28, 2019

I find it strange that I have to manually run (package-initialize) in a non-batch emacs instance to fix the Package X is not installable. errors/warnings in the output of package-lint-current-buffer.

It would be nice if this could be done automatically by package-lint.

Tested using emacs27

@twmr twmr changed the title package-initialize fixes "Package X is not installable warnings package-initialize fixes "Package X is not installable" errors Nov 28, 2019
@purcell
Copy link
Owner

purcell commented Nov 28, 2019

Yeah, the flip side is that there's no real way for us to know if it's appropriate for us to call it for you. We could potentially have a specific error/warning for when no packages appear to be installable.

@gonewest818
Copy link

I've dealt with this in elisp-lint by post-processing the results of package-lint-current-buffer, and if package-archive-contents is nil then I drop all the "package X is not installable" warnings.

@seanfarley
Copy link

I think this is the third time I've randomly bumped into @gonewest818 (we met at a SF emacs meetup :-)) and with his good advice; thanks!

@seanfarley
Copy link

For background, and maybe other people coming here from doom, as a dev, perhaps I chose to use straight.el as a personal preference but I'm writing a package that I want to put on melpa (and have users of use-package) install. Now, I can't use package-lint without having permanent errors about not having installable dependencies :-/

... actually, as I was literally writing this message, I found that M-x package-refresh-contents will fix this error.

Would it be possible to have some logic in package-lint to check for package-archive-contents being nil and suggest running (perhaps auto-running is too much but it would be nice) whichever is the appropriate command?

@akirak
Copy link
Contributor

akirak commented Jun 18, 2020

@seanfarley

I chose to use straight.el as a personal preference

Me too. I ignore this error in interactive mode and run thorough linting in batch mode. You could use makem.sh for example, but I am also developing an alternative.

@seanfarley
Copy link

Oh, hi @akirak! I also use a lot of your packages and am a big fan of yours :-D

@akirak
Copy link
Contributor

akirak commented Jun 18, 2020

@seanfarley Thanks. You seem to be using org-starter, and it's interesting to find an actual configuration example of the package.

@nbfalcon
Copy link

nbfalcon commented Oct 9, 2020

I had the same issue, and it comes from package-lint--check-packages-installable, which checks package-archive-contents.

It can be fixed by adding package-archive-contents to savehist-additional-variables and running M-x package-refresh-contents once. The cached list of packages will be reloaded when Emacs is restarted, so running M-x package-refresh-contents isn't necessary.

Here is the relevant snippet for DOOM:

(after! savehist
  (add-to-list 'savehist-additional-variables 'package-archive-contents))

sean-hut added a commit to sean-hut/eping that referenced this issue Oct 18, 2020
package-lint does not work with straight package manager.
purcell/package-lint#153
Use package-lint through elisp-lint.
elisp-lint has solved the issue. See issue 153.

Signed-off-by: Sean Hutchings <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants