Subject: 29.4; File locations missing in compilation log

From: Sean Devlin <[email-masked]>
Date: Tue, 22 Oct 2024 11:43:34 -0400

Hi folks,

If you install a package from your init file, the compilation log will
lack file locations that are present when installing interactively.

Recipe:

1. mkdir /tmp/emacs-test
2. echo "(package-install 'magit)" > /tmp/emacs-test/.emacs
3. HOME=/tmp/emacs-test emacs

Wait for the compilation of magit to finish, then observe the warnings
and errors in the compilation log lack any prefixed file locations. For
example:

Error (bytecomp): Cannot open load file: No such file or directory,
magit-git

In contrast, if you install interactively via M-x package-install, the
errors and warnings include file locations. For example:

magit-autorevert.el:25:2: Error: Cannot open load file: No such file or
directory, magit-git

I'm not sure if this difference is intentional, but it makes it
difficult to understand where errors are coming from if you install
packages non-interactively via the user init file. It would be useful to
include the file locations in the compilation log even in this case.

Thanks!

In GNU Emacs 29.4 (build 1, aarch64-apple-darwin21.6.0, NS
appkit-2113.60 Version 12.6.6 (Build 21G646)) of 2024-08-02 built on
armbob.lan
Windowing system distributor 'Apple', version 10.3.2566
System Description:  macOS 15.0.1

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000
-DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no'

Configured features:
ACL GLIB GMP GNUTLS JPEG JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER
PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/tmp/emacs-test/.emacs.d/elpa/magit-4.1.1/magit-autorevert hides /tmp/emacs-test/.emacs.d/elpa/magit-section-4.1.1/magit-autorevert
/tmp/emacs-test/.emacs.d/elpa/transient-0.7.7/transient hides /Volumes/Emacs/Emacs.app/Contents/Resources/lisp/transient

Features:
(shadow sort mail-extr emacsbug cus-edit cus-start cus-load ediff
ediff-merg ediff-mult ediff-wind ediff-diff ediff-help ediff-init
ediff-util let-alist magit-bookmark bookmark magit-submodule magit-blame
magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch
magit-clone magit-remote magit-commit magit-sequence magit-notes
magit-worktree magit-tag magit-merge magit-branch magit-reset
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log magit-diff smerge-mode diff git-commit magit-core
magit-autorevert autorevert filenotify magit-margin magit-transient
magit-process with-editor log-edit pcvs-util add-log magit-mode
transient cl-extra magit-git files-x magit-base which-func imenu vc-git
diff-mode vc-dispatcher magit-section crm magit-autoloads benchmark
cursor-sensor magit-section-autoloads warnings icons dash rx
bug-reference dash-autoloads format-spec edmacro kmacro
transient-autoloads pcase shell pcomplete server compat
with-editor-autoloads easy-mmode compat-30 ert-x ert pp ewoc debug
backtrace help-mode find-func wid-edit compat-macs compile comint
ansi-osc ansi-color ring info compat-autoloads loaddefs-gen lisp-mnt
radix-tree tar-mode arc-mode archive-mode mm-archive message sendmail
yank-media dired dired-loaddefs rfc822 mml mml-sec epa derived epg
rfc6068 gnus-util text-property-search time-date mailabbrev gmm-utils
mailheader mm-decode mm-bodies mm-encode mail-utils gnutls
network-stream url-cache url-http url-auth mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny epg-config
finder-inf package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp
byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 334300 49006)
(symbols 48 34481 0)
(strings 32 131912 3930)
(string-bytes 1 3507331)
(vectors 16 41034)
(vector-slots 8 871374 47496)
(floats 8 103 283)
(intervals 56 614 0)
(buffers 984 18))