From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: akrl--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45854: 28.0.50; [feature/native-comp] autoload behavior different in the presence of errors Date: Sun, 17 Jan 2021 15:32:35 +0000 Message-ID: References: <87pn282psi.fsf@collares.org> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37435"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Mauricio Collares , 45854@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 17 16:33:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1A3G-0009WS-4n for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jan 2021 16:33:14 +0100 Original-Received: from localhost ([::1]:42418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1A3F-0000VH-7V for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 17 Jan 2021 10:33:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1A37-0000Tl-UW for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2021 10:33:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1A33-0005N2-Um for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2021 10:33:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l1A33-0003UJ-Rb for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2021 10:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jan 2021 15:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45854 X-GNU-PR-Package: emacs Original-Received: via spool by 45854-submit@debbugs.gnu.org id=B45854.161089757213392 (code B ref 45854); Sun, 17 Jan 2021 15:33:01 +0000 Original-Received: (at 45854) by debbugs.gnu.org; 17 Jan 2021 15:32:52 +0000 Original-Received: from localhost ([127.0.0.1]:45493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1A2t-0003Tv-U3 for submit@debbugs.gnu.org; Sun, 17 Jan 2021 10:32:52 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:52145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1A2o-0003Tk-4r for 45854@debbugs.gnu.org; Sun, 17 Jan 2021 10:32:50 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 10HFWZBv014414 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Sun, 17 Jan 2021 15:32:35 GMT In-Reply-To: (Andrea Corallo's message of "Sun, 17 Jan 2021 16:29:00 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198054 Archived-At: Andrea Corallo writes: > Mauricio Collares writes: > >> The example is a bit convoluted, but it is a reduced example from >> another error I saw in the wild. It's not a big problem, but since this >> might be a bug I thought a report could be useful. I wish I could reduce >> it further, but hopefully this is enough. >> >> Suppose I have three files as below (I've appended an x to the original = package >> names to avoid conflict): >> >> * File 1: transientx.el >> >> ;;; transientx.el --- x -*- lexical-binding: t; -*- >> >> ;; Package-Requires: ((emacs "25.1")) >> ;; Package-Version: 0 >> >> (require 'cl-lib) >> (require 'eieio) >> >> (defclass transient-suffix () ()) >> (cl-defmethod transient--init-suffix-key ((obj transient-suffix))) >> >> ;; (provide 'transientx) commented on purpose to cause an error when req= uiring >> ;;; transientx.el ends here >> >> * File 2: git-commitx.el >> >> ;;; git-commitx.el --- x -*- lexical-binding: t; -*- >> >> ;; Package-Requires: ((emacs "25.1") (transientx "20200601")) >> ;; Package-Version: 20210102.1242 >> >> (require 'transientx) >> >> ;;;###autoload >> (define-minor-mode global-git-commit-mode >> "desc" >> :global t >> :initialize (lambda (symbol exp) >> (add-hook 'find-file-hook 'git-commit-setup-check-buffer= ))) >> >> ;;;###autoload >> (defun git-commit-setup-check-buffer ()) >> >> (provide 'git-commitx) >> >> ;;; git-commitx.el ends here >> >> * File 3: elpa2nix.el >> >> (require 'package) >> (package-initialize) >> >> (defun elpa2nix-install-package () >> (pcase command-line-args-left >> (`(,archive) >> (with-temp-buffer >> (insert-file-contents archive) >> (package-unpack (package-buffer-info)))))) >> >> Then running the following two commands in order produces the stack >> trace below on the native-comp branch: >> >> $ emacs --batch -Q -l ~/elpa2nix.el -f elpa2nix-install-package transien= tx.el >> $ emacs --batch -Q -l ~/elpa2nix.el -f elpa2nix-install-package git-comm= itx.el >> >> git-commitx.el:6:1: Error: Loading file /home/collares/.emacs.d/elpa/tra= nsientx-0/transientx.elc failed to provide feature =E2=80=98transientx=E2= =80=99 >> Done (Total of 0 files compiled, 1 failed, 2 skipped) >> >> Debugger entered--Lisp error: (error "transient--init-suffix-key is alre= ady defined as s...") >> error("%s is already defined as something else than a gen..." transien= t--init-suffix-key) >> cl-generic-ensure-function(transient--init-suffix-key) >> cl-generic-define-method(transient--init-suffix-key nil ((obj transien= t-suffix)) nil #f(compiled-function (obj) #)) >> require(transientx) >> load-with-code-conversion("/home/collares/.emacs.d/elpa/git-commitx-20= 210102...." "/home/collares/.emacs.d/elpa/git-commitx-20210102...." nil t) >> git-commit-setup-check-buffer() >> run-hooks(find-file-hook) >> after-find-file(nil t) >> find-file-noselect-1(# "~/git-commitx.el" nil n= il "~/git-commitx.el" (7340496 65025)) >> find-file-noselect("/home/collares/git-commitx.el") >> command-line-1(("-l" "/home/collares/elpa2nix.el" "-f" "elpa2nix-insta= ll-package" "/home/collares/git-commitx.el")) >> command-line() >> normal-top-level() >> >> The transient--init-suffix-key error does not appear on trunk (the >> "failed to provide feature" error appears as expected). Reverting commit >> 7d7bfbf0346114b116e14a4338ea235d12674f13 makes the change of behaviour >> disappear, but I suspect it's not the true cause of the difference. > > Hi Mauricio, > > I failed to reproduce on latest native-comp 88100bed0a. Either I missed > somenthing or is maybe fixed by the latest merge? > > Could you check if you still see this? > > Thanks > > Andrea > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose > the contents to any other person, use it for any purpose, or store or > copy the information in any medium. Thank you. Apologies, I've mistakenly used the wrong mail account