Subject: bug#57494: `package-install' no longer byte-compiles files of installed packages

From: Paul Pogonyshev <[email-masked]>
Date: Wed, 31 Aug 2022 13:27:33 +0200

Here is the output of `report-emacs-bug':

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo
version 1.16.0, Xaw3d scroll bars)
System Description: Debian GNU/Linux 11 (bullseye)

Configured using:
 'configure
 --prefix=/nix/store/fam04cbjqrwhvzg2j35pabikpgf0a9k1-emacs-snapshot-a1fa3d24
 --disable-build-details --with-modules'

Configured features:
CAIRO FREETYPE GIF GLIB GMP GNUTLS GSETTINGS JPEG JSON LCMS2 LIBXML2
MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP X11 XAW3D XDBE XIM XPM LUCID ZLIB

Important settings:
  locale-coding-system: nil

Major mode:

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail warnings dash rx compile comint
ansi-color ring info easy-mmode bug-reference autoload radix-tree
lisp-mnt tar-mode arc-mode archive-mode cus-edit pp cus-start cus-load
wid-edit mm-archive message yank-media dired dired-loaddefs rfc822 mml
mml-sec epa derived gnus-util text-property-search time-date mailabbrev
gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils gnutls
network-stream url-http mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm rmc puny url-cache url-auth epg rfc6068
epg-config finder-inf package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json map url-vars seq subr-x
byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib gv iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
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 cl-generic
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 simple abbrev obarray
cl-preloaded nadvice button 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
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 121091 22458)
 (symbols 48 12070 2)
 (strings 32 37331 1171)
 (string-bytes 1 1138807)
 (vectors 16 17191)
 (vector-slots 8 200388 6522)
 (floats 8 32 260)
 (intervals 56 132 0)
 (buffers 992 10))

I pulled updates for the Docker image, still the same result. It
might be that the image is broken, of course, but it used to work
until some 10 days ago:

https://app.circleci.com/pipelines/github/clojure-emacs/cider?branch=master

I also tried with `emacs -Q --batch --load does-install-byte-compile.el',
i.e. adding `-Q' flag. Still fails. Here is the updated recipe:

cat >does-install-byte-compile.el <<EOF
(setf package-user-dir (make-temp-file "emacs-packages" t))
(require 'package)
(package-initialize t)
(package-install 'dash)
(message "%S" (byte-code-function-p (symbol-function '-each)))
(unless (byte-code-function-p (symbol-function '-each))
  (report-emacs-bug "XXX")
  (message "\n%s" (buffer-string)))
EOF

emacs -Q --batch --load does-install-byte-compile.el

Here is how I start the Docker with Emacs image:

$ docker create -it --name emacs --rm silex/emacs:master /bin/bash &&
docker start emacs -ai

For comparison, with image `silex/emacs:28' the installed package is
byte-compiled.

Paul

Paul