holomorph / systemd-mode

Major mode for editing systemd units
GNU General Public License v3.0
54 stars 20 forks source link

Byte compilation error with Emacs 26 pretest #7

Open drot opened 7 years ago

drot commented 7 years ago

Related to #5, with the Emacs 26 pretest (26.0.90) and the following init file:

(package-initialize)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

(eval-when-compile
  (require 'use-package))

(use-package systemd
  :ensure t)

The following byte compilation error is being reported:

Compiling file /home/drot/.emacs.d/elpa/systemd-20171006.1352/systemd.el at Tue Oct 17 19:01:57 2017
Entering directory ‘/home/drot/.emacs.d/elpa/systemd-20171006.1352/’
Error (bytecomp): Opening input file: No such file or directory, /home/drot/.emacs.d/unit-directives.txt
holomorph commented 7 years ago

For some reason load-file-name is still ~/.emacs.d/init.el when the byte compile happens, but I don't know why.

humitos commented 6 years ago

This is still happening with systemd-20180101.1803.

It seems the problem is how use-package handle the PATH, since

$ emacs --batch --eval '(byte-compile-file "elpa/systemd-20180101.1803/systemd.el")'

doesn't produce any error.

drot commented 6 years ago

The issue also happens without use-package:

(package-initialize)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))

(unless (package-installed-p 'systemd)
  (package-refresh-contents)
  (package-install 'systemd))

If you clone the systemd-mode repo and try M-x package-install-file to install it from the repo it also happens, so the problem could be package.el itself.

vincentbernat commented 6 years ago

I run into this problem with Emacs 25.3 as well. Is it expected?

sergeyklay commented 4 years ago

I got the same with Debian 10, Emacs 26.3 and use-package.