mohkale / flymake-collection

Collection of checkers for flymake
MIT License
68 stars 13 forks source link

Cannot open load file: No such file or directory, flymake-collection #4

Closed alternateved closed 2 years ago

alternateved commented 2 years ago

Hello @mohkale,

I was wondering if moving files to src/ folder is the best solution to organize things in this repository. flymake-collection in its current state is still not on MELPA and installing it with straight requires additional steps like explicitly loading pointing what files needs loading otherwise package won't work.

Something like this doesn't work with Cannot open load file: No such file or directory, flymake-collection error:

(use-package flymake-collection
  :straight (flymake-collection :host github
                                :repo "mokhale/flymake-collection")
  :hook (after-init . flymake-collection-hook-setup))

Something like this does work:

(use-package flymake-collection
  :straight (flymake-collection :host github
                                :repo "mokhale/flymake-collection"
                                :files ("src/*.el" "src/checkers/*.el"))
  :hook (after-init . flymake-collection-hook-setup))

I am not sure what would be the effect of installing this package via MELPA yet (if this will get properly loaded), but wouldn't it be better to simplify installation a bit? I do not know Emacs Lisp well at all, but I was wondering if there is a way to load package source files without loading them manually.

mohkale commented 2 years ago

@alternateved

Yes, I was aware the transition would break new MELPA installs and upgrades but I was sorta hoping the MELPA PR would get merged in quick enough that peoples installs wouldn't break :sweat:. Since that's taking longer than expected I've pushed a fix to master. Please try again using just :straight t and it should work.

Note: Since we've also moved a new major version breaking changes are to be expected, but there are aliases setup for everything so your existing setup should still work.

I am not sure what would be the effect of installing this package via MELPA yet

It should be just like installing flymake-rest. https://github.com/mohkale/flymake-rest now redirects to flymake-collection, so trying to pull it that way would install flymake-collection.

In your case with straight I thought by default straight would pulll a version from your lockfile (which would be from before the change) but it seems to just download the master version. You'd have to straight-thaw-versions afterwards for that to work I presume.

alternateved commented 2 years ago

Thank you very much, now it works with :straight t.

mohkale commented 2 years ago

That's great to hear. Apologies for any frustration due to this change :sweat:.

alternateved commented 2 years ago

No worries, I really like the latest changes. Thank you for your work.