From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Steve Purcell Newsgroups: gmane.emacs.bugs Subject: bug#34462: 27.0.50; package.el breakage when features are loaded in after-init-hook Date: Wed, 13 Feb 2019 09:03:14 +1300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="32613"; mail-complaints-to="usenet@blaine.gmane.org" To: 34462@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 12 21:05:25 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gteJ2-0008Mq-QH for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Feb 2019 21:05:25 +0100 Original-Received: from localhost ([127.0.0.1]:45377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gteJ1-0006r2-OI for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Feb 2019 15:05:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gteIk-0006pb-EG for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 15:05:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gteIh-0002S8-0M for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 15:05:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45973) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gteIg-0002RR-Mr for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 15:05:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gteIg-0007CS-Cw for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 15:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Steve Purcell Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Feb 2019 20:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34462 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.155000185627621 (code B ref -1); Tue, 12 Feb 2019 20:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Feb 2019 20:04:16 +0000 Original-Received: from localhost ([127.0.0.1]:45254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gteHv-0007BR-R7 for submit@debbugs.gnu.org; Tue, 12 Feb 2019 15:04:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gteHs-0007BD-VH for submit@debbugs.gnu.org; Tue, 12 Feb 2019 15:04:13 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41154) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gteHm-0000uY-Tz for submit@debbugs.gnu.org; Tue, 12 Feb 2019 15:04:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gteHj-00066Q-W8 for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 15:04:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gteHh-0000lW-Ue for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 15:04:03 -0500 Original-Received: from purcellpeople.com ([85.214.32.38]:54250 helo=mail.purcellpeople.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gteHf-0000RS-5a for bug-gnu-emacs@gnu.org; Tue, 12 Feb 2019 15:04:00 -0500 Original-Received: from Tulku.local (unknown [103.233.220.189]) by mail.purcellpeople.com (Postfix) with ESMTPSA id CCED924C3D4E for ; Tue, 12 Feb 2019 21:03:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=sanityinc.com; s=default; t=1550001801; bh=1k+C7Vy2TEH+t/uEBvRlcEhKnQmASZGzdY8+pESA/ZQ=; h=From:To:Subject:Date:From; b=dW8YJLhIoChwH8ilNeJ1ujJjG4un+zxqhgQci3JZSI7N/uLgrIwxLtfNgYbQReDaX g6Tqg0DWIg3LcW1i71U88yACy3BeAHdTnHUAmzQ/Cxq2UyhO0PiKnny0wSHiwzNhEK prRcuhoY5nYxibotrwzJxzKzQgKi6Ca69MBrBA5A= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:155384 Archived-At: Given an init.el snippet like: (add-hook 'after-init-hook (lambda () (require 'server) (unless (server-running-p) (server-start)))) the `load-history' var will contain an entry with a nil car (as per its documentation), inside which the `(require . server)' load will be noted. However, the code in `package--list-loaded-files' unconditionally applies `file-name-sans-extension' to the cars of `load-history', resulting in errors whenever packages are activated (e.g. upgraded, installed). I believe the correct fix would be simply add a `stringp' test here: https://github.com/emacs-mirror/emacs/blob/5abaf16ab49b86ca5add981c2ddcaea6db0c8a08/lisp/emacs-lisp/package.el#L759 (Using a nightly Emacs HEAD snapshot from a couple of days ago.) In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109)) of 2019-02-12 built on Tulku.local Windowing system distributor 'Apple', version 10.3.1671 System Description: Mac OS X 10.14.3 Recent messages: Mark set [6 times] Entering debugger... Back to top level Mark set [2 times] Mark saved where search started Mark set Mark saved where search started Mark set Quit [2 times] Entering debugger... Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS PDUMPER Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US locale-coding-system: utf-8 Major mode: ELisp Minor modes in effect: global-magit-file-mode: t magit-auto-revert-mode: t global-git-commit-mode: t async-bytecomp-package-mode: t default-text-scale-mode: t recentf-mode: t company-quickhelp-mode: t company-quickhelp-local-mode: t winner-mode: t global-anzu-mode: t anzu-mode: t counsel-mode: t diredfl-global-mode: t ivy-mode: t flycheck-color-mode-line-mode: t global-flycheck-mode: t flycheck-mode: t global-company-mode: t company-mode: t elisp-slime-nav-mode: t aggressive-indent-mode: t highlight-quoted-mode: t display-line-numbers-mode: t rainbow-delimiters-mode: t symbol-overlay-mode: t bug-reference-prog-mode: t paredit-mode: t goto-address-prog-mode: t origami-mode: t savehist-mode: t electric-pair-mode: t global-auto-revert-mode: t mode-line-bell-mode: t beacon-mode: t show-paren-mode: t global-page-break-lines-mode: t page-break-lines-mode: t hes-mode: t guide-key-mode: t global-whitespace-cleanup-mode: t whitespace-cleanup-mode: t global-diff-hl-mode: t diff-hl-mode: t diff-auto-refine-mode: t projectile-rails-global-mode: t projectile-mode: t ipretty-mode: t auto-compile-on-load-mode: t auto-compile-on-save-mode: t auto-compile-mode: t immortal-scratch-mode: t nyan-mode: t shell-dirtrack-mode: t whole-line-or-region-global-mode: t whole-line-or-region-local-mode: t dimmer-mode: t delete-selection-mode: t cua-mode: t desktop-save-mode: t ns-auto-titlebar-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t global-prettify-symbols-mode: t prettify-symbols-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t view-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug sendmail disass align two-column iso-transl help-fns cl-print debug backtrace autoload radix-tree tar-mode mm-archive gnutls network-stream url-cache skeleton smex move-dup misearch multi-isearch mc-mark-more multiple-cursors-core rect wgrep magit-extras magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash 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 magit-core magit-autorevert magit-process magit-margin magit-mode git-commit magit-git magit-section magit-utils magit-popup which-func ido crm log-edit pcvs-util add-log with-editor async-bytecomp async bookmark cus-edit default-text-scale recentf tree-widget company-quickhelp pos-tip winner mhtml-mode prettier-js cursor-sensor mmm-sample org-rmail org-mhe org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range message rfc822 mml mml-sec epa epg mm-decode mm-bodies mm-encode mailabbrev gmm-utils mailheader gnus-win org-docview doc-view image-mode org-bibtex bibtex org-bbdb org-w3m org-element avl-tree ob-sqlite ob-shell ob-ruby ob-python ob-plantuml ob-octave ob-ledger ob-latex ob-gnuplot ob-dot ob-ditaa ob-R org-clock org org-macro org-footnote org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar cal-loaddefs company-robe rspec-mode yard-mode robe url-http url-auth mail-parse rfc2231 url-gw nsm rmc cap-words superword subword dante lcr haskell haskell-completions haskell-load haskell-commands highlight-uses-mode haskell-modules haskell-sandbox haskell-navigate-imports haskell-repl haskell-svg haskell-collapse hideshow haskell-debug haskell-interactive-mode haskell-presentation-mode haskell-compile haskell-process haskell-session haskell-hoogle hindent skewer-css skewer-mode cache-table js2-imenu-extras js2-mode simple-httpd css-eldoc css-eldoc-hash-table css-mode eww mm-url gnus nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums time-date mail-utils wid-edit url-queue shr text-property-search puny svg browse-url flycheck-elm elm-mode elm-interactive url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap elm-font-lock elm-indent elm-imenu elm-format elm-tags elm-util inf-haskell haskell-decl-scan haskell-mode haskell-cabal haskell-utils haskell-font-lock haskell-indentation haskell-string haskell-sort-imports haskell-lexeme haskell-align-imports haskell-compat haskell-complete-module haskell-ghc-support flymake-proc flymake warnings haskell-customize sh-script executable company-terraform company-terraform-data terraform-mode hcl-mode make-mode conf-mode json-mode json-reformat json-snatcher js cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs vc-mtn vc-hg vc-bzr vc-src vc-sccs vc-svn vc-cvs vc-rcs diff-hl-dired tabify perl-mode cperl-mode smerge-mode rainbow-mode dhall-mode reformatter mmm-mode mmm-univ mmm-class mmm-erb mmm-region tagedit sgml-mode dom yaml-mode psc-ide psc-ide-flycheck psc-ide-protocol psc-ide-backported dash-functional purescript-indentation psci add-node-modules-path purescript-font-lock purescript-mode purescript-string purescript-sort-imports purescript-align-imports noutline outline dabbrev view anzu counsel xdg diredfl dired dired-loaddefs swiper ivy colir ivy-overlay ffap flycheck-color-mode-line flycheck-package package-lint imenu finder lisp-mnt flycheck find-func let-alist company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-capf company-cmake company-xcode company-clang company-bbdb company-php company-template ac-php-core popup company-nixos-options nixos-options company pcase disp-table vc-git vc-darcs xml elisp-slime-nav etags fileloop generator xref project aggressive-indent highlight-quoted display-line-numbers rainbow-delimiters symbol-overlay bug-reference paredit-everywhere paredit goto-addr origami origami-parsers savehist elec-pair autorevert filenotify mode-line-bell beacon paren page-break-lines highlight-escape-sequences guide-key popwin whitespace-cleanup-mode whitespace diff-hl vc-dir ewoc vc vc-dispatcher diff-mode cl-extra help-mode projectile-rails rake f dash s inflections inf-ruby ruby-mode smie projectile grep compile ibuf-ext ibuffer ibuffer-loaddefs thingatpt jka-compr ipretty auto-compile packed immortal-scratch uptimes pp server nyan-mode init init-local init-locales mm-util mail-prsvr docker-tramp tramp-cache tramp tramp-loaddefs trampver tramp-compat shell pcomplete comint ansi-color ring parse-time format-spec advice session sanityinc-tomorrow-eighties-theme color-theme-sanityinc-tomorrow diminish whole-line-or-region dimmer subr-x face-remap color cus-load init-ledger init-dash init-folding init-misc init-common-lisp init-clojure-cider init-clojure init-slime init-lisp cl-lib-highlight init-paredit init-nix init-terraform init-docker init-yaml init-toml init-rust init-sql init-rails init-ruby init-purescript init-elm init-haskell init-python init-http init-haml init-css init-html init-nxml init-org init-php init-javascript easy-mmode init-erlang erlang-start init-csv init-markdown init-textile init-compile init-projectile init-github init-git init-darcs init-vc init-whitespace init-editing-utils delsel cua-base init-mmm mmm-auto mmm-vars mmm-utils mmm-compat init-sessions desktop frameset init-windows windmove init-company init-hippie-expand init-ivy init-smex init-recentf init-flycheck init-ibuffer ibuf-macs init-uniquify init-grep init-isearch init-dired init-gui-frames ns-auto-titlebar init-osx-keys init-themes init-xterm init-frame-hooks init-exec-path exec-path-from-shell init-elpa fullframe finder-inf gh-common marshal eieio-compat rx edmacro kmacro slime-autoloads info package easymenu epg-config url-handlers url-parse auth-source eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars seq byte-opt bytecomp byte-compile cconv init-site-lisp cl-seq cl gv cl-loaddefs cl-lib init-utils init-benchmarking derived tooltip cus-start eldoc electric uniquify ediff-hook vc-hooks lisp-float-type 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 elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 2422385 377720) (symbols 48 73154 813) (strings 32 372448 32970) (string-bytes 1 12111991) (vectors 16 144591) (vector-slots 8 2813290 579564) (floats 8 2029 6391) (intervals 56 160180 9260) (buffers 992 148))