Przemyslaw Kryger writes: > I am using package-vc to manage a few pakcages I maintain. However, in Emacs > 31 I observed a couple issues. > > The first discrepancy with what used to happen on Emacs 30 is when a package is > installed from a custom location, no *.elc files are produced. I don't know > what the expected behaviour should be here. > > In addition to that when I attempt to rebuild such a package with > package-vc-rebuild it signals an error, which I believe shouldn't happen, > should it? In this case no *.elc files have been produced nor updated. Such a > workflow used to work on Emacs 30. Both of these shouldn't happen. > I observed this on a Emacs macport (from > https://github.com/jdtsmith/emacs-mac/tree/emacs-mac-gnu_master_exp), but the > issue is reproducible on master (68aaeb3519fd7f6176050e142f0dbc27e07992d2) as > well. > > git clone https://github.com/pkryger/helm-projectile "${HOME}/tmp/helm-projectile" > emacs -Q > > (require 'package) > (add-to-list 'package-archives '(melpa . "https://melpa.org/packages/")) ^ this should be a string! > ;; Just to avoid using existing elpa > (setq package-user-dir (expand-file-name "tmp/elpa" (getenv "HOME"))) (Unrelated, but is there a reason you aren't doing (expand-file-name "~/tmp/elpa")?) > (package-refresh-contents) > ;; In my config I use hardcoded paths, but `use-package' needs a > ;; string for `:load-path', so just for this sample > (let ((pkg-dir (expand-file-name "tmp/helm-projectile" (getenv "HOME")))) > (eval > `(use-package helm-projectile > :vc t > :load-path ,pkg-dir))) For posterity, this expands to --8<---------------cut here---------------start------------->8--- (progn (eval-and-compile (add-to-list 'load-path "/tmp/helm-projectile/")) (use-package-vc-install '(helm-projectile) "/tmp/helm-projectile/") (defvar use-package--warning0 #'(lambda (keyword err) (let ((msg (format "%s/%s: %s" 'helm-projectile keyword (error-message-string err)))) (display-warning 'use-package msg :error)))) (condition-case-unless-debug err (if (not (require 'helm-projectile nil t)) (display-warning 'use-package (format "Cannot load %s" 'helm-projectile) :error)) (error (funcall use-package--warning0 :catch err)))) --8<---------------cut here---------------end--------------->8--- which for us means that we are interested in (use-package-vc-install '(helm-projectile) "/tmp/helm-projectile/") which in turn would invoke (package-vc-install-from-checkout "/tmp/helm-projectile/" "helm-projectile") > > ;; At this point `helm-projectile' has been installed, but no *.elc files are > ;; produced, which differs from Emacs 30. > > (setq debug-on-error t) > M-x package-vc-rebuild RET helm-projectile RET > > Which yields the following: > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > expand-file-name(nil) > vc-file-getprop(nil vc-working-revision) > vc-working-revision(nil) > package-vc--unpack-1(#s(package-desc :name helm-projectile :version (1 3 1) :summary "Helm integration for Projectile" :reqs nil :kind vc :archive nil :dir "/Users/pkryger/tmp/elpa/helm-projectile/" :extras ((:commit . "2ecd3d85b7077f39bb2fefe2227cc46931d4b92b")) :signed nil) "/Users/pkryger/tmp/elpa/helm-projectile/") > package-vc-rebuild(#s(package-desc :name helm-projectile :version (1 3 1) :summary "Helm integration for Projectile" :reqs nil :kind vc :archive nil :dir "/Users/pkryger/tmp/elpa/helm-projectile/" :extras ((:commit . "2ecd3d85b7077f39bb2fefe2227cc46931d4b92b")) :signed nil)) > funcall-interactively(package-vc-rebuild #s(package-desc :name helm-projectile :version (1 3 1) :summary "Helm integration for Projectile" :reqs nil :kind vc :archive nil :dir "/Users/pkryger/tmp/elpa/helm-projectile/" :extras ((:commit . "2ecd3d85b7077f39bb2fefe2227cc46931d4b92b")) :signed nil)) > call-interactively(package-vc-rebuild record nil) > command-execute(package-vc-rebuild record) > execute-extended-command(nil "package-vc-rebuild" "pack-v-re") > funcall-interactively(execute-extended-command nil "package-vc-rebuild" "pack-v-re") > call-interactively(execute-extended-command nil nil) > command-execute(execute-extended-command) I couldn't reproduce this stack trace :/ It seems like `package-vc--main-file' returned nil. Can you check what the function returns, perhaps using edebug? > Could these be introduced by 4226eb2b20408ba49787195bbc59bb0066c9c9e4? That seems reasonable, but in that case we should be able to reproduce the issue with a more simple example (especially one that doesn't involve use-package, MELPA and missing dependencies). I tried it out with a local package I had lying around and I also noticed that we don't byte-compile files anymore! This should fix the first issue, but it probably won't change anything about the latter: