swiper icon indicating copy to clipboard operation
swiper copied to clipboard

'make compile' fails

Open basil-conto opened this issue 5 years ago • 7 comments

Seen after commit 62815d9296cedd1de85c7d722789d0e530a4d157 addressing #2574:

  1. cd /path/to/swiper
  2. emacs -Q
  3. M-xcompileRET
  4. C-aC-kmake compileRET
-*- mode: compilation; default-directory: "~/.emacs.d/src/swiper/" -*-
Compilation started at Wed May 27 21:30:04

make compile
emacs -batch -l elpa.el -L . -f batch-byte-compile colir.el ivy-faces.el ivy-overlay.el ivy.el ivy-avy.el swiper.el counsel.el

In toplevel form:
ivy-avy.el:26:1: Error: Cannot open load file: No such file or directory, avy
make: *** [Makefile:18: compile] Error 1

Compilation exited abnormally with code 2 at Wed May 27 21:30:05

basil-conto avatar May 27 '20 20:05 basil-conto

I am also running into this error when trying to update ivy. Perhaps the comment by @kiennq in #2574 could be addressed by adding an autoload form for ivy-avy in ivy.el as is done for the ivy-hydra commands? And then commit 62815d9 could be reverted to fix the current issue unless there is a particular reason why ivy-avy.el needs to be compiled? (I notice that ivy-hydra.el is not compiled either and I suppose compiling it would yield a similar error for users who didn't install hydra.)

ericdanan avatar Jun 06 '20 14:06 ericdanan

There's no reason why all files can't be byte-compiled, even when third-party packages are missing.

basil-conto avatar Jun 06 '20 15:06 basil-conto

@basil-conto Thanks. I thought the error meant simply that avy was not present, but indeed it can't be that since I realize that I do actually have avy installed (as a dependency of ace-window). So I don't know what the issue is. In case it's relevant I install ivy (and all other packages) through el-get.

ericdanan avatar Jun 06 '20 15:06 ericdanan

@ericdanan The project's Makefile overrides package-user-dir, so it doesn't pick up avy installed in the usual place. See #2573.

basil-conto avatar Jun 06 '20 16:06 basil-conto

ivy-avy.el is already automatically tested on Travis CI.

See from .travis.yml the details of how it's done:

make deps
make test

abo-abo avatar Jun 07 '20 15:06 abo-abo

The reason why make compile does not depend on make deps is that make deps is a slow action, that does not need to be performed too often.

Maybe we could add a stub file in ~/.elpa/EMACS_VERSION and then check its timestamp to see if we need to do make deps.

abo-abo avatar Jun 07 '20 15:06 abo-abo

No, the right thing would be to have all package files compilable and testable without having third-party packages installed.

As long as Avy is not listed as a package dependency, then Ivy should be cleanly compilable and testable without it.

basil-conto avatar Jun 07 '20 17:06 basil-conto