Subject: bug#59728: 30.0.50; package-vc does not handle package-quickstart

From: Matt Armstrong <[email-masked]>
Date: Wed, 30 Nov 2022 10:35:02 -0800

X-debbugs-cc: Philip Kaludercic <[email-masked]>, Stefan Monnier <[email-masked]>

package.el provides `package-quickstart':

    package-quickstart is a variable defined in ‘package.el’.

    Its value is t
    Original value was nil

    Precompute activation actions to speed up startup.
    This requires the use of ‘package-quickstart-refresh’ every time the
    activations need to be changed, such as when ‘package-load-list’ is modified.

This places a package-quickstart.elc file in `user-emacs-directory' that
is loaded at startup, instead of loading the individual
`user-emacs-directory'/elpa/*-autoloads.el files.

In practice package.el takes care of calling
`package-quickstart-refresh' as needed.  As a user making normal use of
package.el I don't believe I have ever needed to call
`package-quickstart-refresh' manually.

I am playing with package-vc.el and immediately noticed that functions
like `package-vc-install-from-checkout' and `package-vc-rebuild' do not
call `package-quickstart-refresh'.

The effect is that package-vc leaves a "stale" package-quickstart.elc in
the `user-emacs-directory', and the user must run
`package-quickstart-refresh' manually.

Ideally the various `package-vc-*' functions take care of running the
function when necessary.

----------------------------------------------------------------------

In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
 3.24.34, cairo version 1.16.0) of 2022-11-30 built on naz
Repository revision: 1abda0c83981a6d35dd4b2dd3e88e9886d13cb09
Repository branch: master
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure 'CFLAGS=-Og -g3 -fsanitize=address' 'CXXFLAGS=-Og -g3
 -fsanitize=address' LDFLAGS=-static-libasan --enable-checking=yes
 --enable-check-lisp-object-type --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS XIM GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: ELisp/l

Minor modes in effect:
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  bug-reference-prog-mode: t
  msb-mode: t
  display-time-mode: t
  flyspell-mode: t
  global-tab-line-mode: t
  tab-line-mode: t
  server-mode: t
  shell-dirtrack-mode: t
  auto-insert-mode: t
  keyfreq-autosave-mode: t
  keyfreq-mode: t
  savehist-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  editorconfig-mode: t
  which-key-mode: t
  electric-pair-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t

Load-path shadows:
~/env/elisp/ol-notmuch hides /home/matt/.config/emacs/elpa/ol-notmuch-2.0.0/ol-notmuch
/home/matt/.config/emacs/elpa/transient-0.3.7/transient hides /home/matt/git/e/daily-driver/lisp/transient

Features:
(shadow sort mail-extr dabbrev emacsbug shortdoc cl-print cus-edit pp
cus-start cus-load badautoloads-autoloads magit-extras face-remap
magit-submodule magit-obsolete 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 which-func imenu
edebug debug backtrace magit-diff smerge-mode diff git-commit log-edit
add-log magit-core magit-autorevert autorevert magit-margin
magit-transient magit-process with-editor magit-mode magit-git dired-aux
copyright mule-util magit-utils crm loaddefs-gen mm-archive
network-stream url-cache url-http url-auth url-gw nsm vc-hg vc-bzr
vc-src vc-sccs vc-svn vc-cvs vc-rcs log-view pcvs-util package-vc vc
lisp-mnt package-x misearch multi-isearch vc-git diff-mode vc-dispatcher
bug-reference protbuf msb time flyspell ispell org-element org-persist
org-id avl-tree ol-w3m ol-rmail ol-mhe ol-irc ol-info org-habit
org-agenda org-refile ol-gnus nnselect gnus-art mm-uu mml2015 mm-view
mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start
gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo parse-time
gnus-spec gnus-int gnus-range message sendmail yank-media rfc822 mml
mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils
mailheader gnus-win ol-eww eww xdg url-queue shr pixel-fill kinsoku
url-file svg xml dom puny mm-url gnus nnheader gnus-util mail-utils
range wid-edit mm-util mail-prsvr ol-doi org-link-doi ol-docview
doc-view filenotify jka-compr image-mode exif dired dired-loaddefs
ol-bibtex bibtex iso8601 ol-bbdb midnight tab-line server geiser-guile
info-look transient geiser-debug geiser-repl compile
text-property-search geiser-image geiser-capf geiser-doc geiser-menu
geiser-autodoc geiser-edit etags fileloop generator xref
geiser-completion geiser-eval geiser-connection tq geiser-syntax scheme
geiser-log geiser-popup view geiser web-mode disp-table nix-mode ffap
thingatpt smie nix-repl nix-shell nix-store magit-section dash nix-log
nix-instantiate nix-shebang nix-format nix finder-inf dirtrack ob-shell
shell ob-ruby ob-python python pcase treesit ob-dot org-protocol org ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint
org-pcomplete pcomplete comint ansi-osc ansi-color org-list org-footnote
org-faces org-entities time-date noutline outline ob-emacs-lisp ob-core
ob-eval org-cycle org-table org-keys oc org-loaddefs find-func cal-menu
calendar cal-loaddefs ol-notmuch ol rx org-fold org-fold-core org-compat
org-version org-macs format-spec skeleton autoinsert advice keyfreq
project edmacro kmacro warnings icons savehist icomplete editorconfig
editorconfig-core editorconfig-core-handle editorconfig-fnmatch
which-key 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 eieio eieio-core
password-cache json subr-x map byte-opt url-vars cl-extra cl-macs gv
cl-seq elec-pair use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core bytecomp byte-compile info geiser-guile-autoloads
geiser-impl help-fns radix-tree help-mode cl-loaddefs cl-lib
geiser-custom geiser-base ring geiser-autoloads orderless-autoloads
nix-mode-autoloads graphviz-dot-mode-autoloads markdown-mode-autoloads
org-drill-autoloads persist-autoloads ox-hugo-autoloads tomelr-autoloads
ol-notmuch-autoloads notmuch-autoloads pylint-autoloads elpy-autoloads
highlight-indentation-autoloads pyvenv-autoloads s-autoloads
flymake-ruby-autoloads flymake-easy-autoloads go-mode-autoloads
yasnippet-autoloads company-autoloads shfmt-autoloads
flymake-yamllint-autoloads yaml-mode-autoloads debbugs-autoloads
bazel-autoloads clang-format+-autoloads clang-format-autoloads
google-c-style-autoloads cmake-mode-autoloads meson-mode-autoloads
d-mode-autoloads magit-autoloads git-commit-autoloads
transient-autoloads magit-section-autoloads dash-autoloads
with-editor-autoloads vertico-autoloads editorconfig-autoloads
which-key-autoloads exec-path-from-shell-autoloads use-package-autoloads
bind-key-autoloads envrc-autoloads inheritenv-autoloads
web-mode-autoloads nixpkgs-fmt-autoloads reformatter-autoloads rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win pgtk-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 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 dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo gtk pgtk lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 654397 159228)
 (symbols 48 41290 29)
 (strings 32 217792 26674)
 (string-bytes 1 6059735)
 (vectors 16 76757)
 (vector-slots 8 887126 115596)
 (floats 8 417 667)
 (intervals 56 8512 1191)
 (buffers 984 31))