all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* seq; Error during initial package install
@ 2024-04-18 18:29 Parker, Ron
  2024-04-27  8:36 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Parker, Ron @ 2024-04-18 18:29 UTC (permalink / raw)
  To: emacs-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 4288 bytes --]

When I start Emacs on a fresh install of my configuration, I have to
restart a couple times before all of the packages successfully install.
Upon trying to debug it, I ran into an error with seq being unable to
load seq-25.el and reduced it to a minimal test case.

Put the following in an empty directory as init.el:

  (setq debug-on-error t
        package-install-upgrade-built-in t)
  (package-install 'seq)

then in the directory run:

  emacs -Q --init-directory $(pwd) -l init.el

When I do this, I get the following error:

  Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "seq-25")
    require(seq-25)
    (if (version< emacs-version "25") (require 'seq-24) (require 'seq-25))
    load-with-code-conversion("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq..." "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq..." nil t)
    #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32>(("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq" . 76))
    mapc(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32> (("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq" . 76)))
    package--reload-previously-loaded(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation functions" :reqs nil :kind nil :archive nil :dir "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24" :extras ((:keywords "sequences") (:maintainer nil . emacs-devel@gnu.org<mailto:emacs-devel@gnu.org>) (:authors ("Nicolas Petton" . nicolas@petton.fr<mailto:nicolas@petton.fr>)) (:url . https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :signed nil))
    package-activate-1(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation functions" :reqs nil :kind nil :archive nil :dir "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24" :extras ((:keywords "sequences") (:maintainer nil . emacs-devel@gnu.org<mailto:emacs-devel@gnu.org>) (:authors ("Nicolas Petton" . nicolas@petton.fr<mailto:nicolas@petton.fr>)) (:url . https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :signed nil) :reload :deps)
    package-unpack(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer nil . emacs-devel@gnu.org<mailto:emacs-devel@gnu.org>) (:authors ("Nicolas Petton" . nicolas@petton.fr<mailto:nicolas@petton.fr>)) (:url . https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :signed nil))
    #f(compiled-function () #<bytecode 0x1511bb8ba7930de3>)()
    package--with-response-buffer-1(https://elpa.gnu.org/packages/ #f(compiled-function () #<bytecode 0x1511bb8ba7930de3>) :file "seq-2.24.tar" :async nil :error-function #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_79> :noerror nil)
    package-install-from-archive(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer nil . emacs-devel@gnu.org<mailto:emacs-devel@gnu.org>) (:authors ("Nicolas Petton" . nicolas@petton.fr<mailto:nicolas@petton.fr>)) (:url . https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :signed nil))
    package-download-transaction((#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer nil . emacs-devel@gnu.org<mailto:emacs-devel@gnu.org>) (:authors ("Nicolas Petton" . nicolas@petton.fr<mailto:nicolas@petton.fr>)) (:url . https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :signed nil)))
    package-install(seq)
    load-with-code-conversion("/Users/<username>/.emacs-test-elpa-seq/init.el" "/Users/<username>/.emacs-test-elpa-seq/init.el" nil t)
    command-line-1(("-l" "init.el" "init.el"))
    command-line()
    normal-top-level()

Emacs  : GNU Emacs 29.1 (build 1, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build 23C71))
Package: seq

--
Ron Parker

[-- Attachment #2: Type: text/html, Size: 8326 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: seq; Error during initial package install
  2024-04-18 18:29 seq; Error during initial package install Parker, Ron
@ 2024-04-27  8:36 ` Eli Zaretskii
  2024-04-27  9:17   ` Philip Kaludercic
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2024-04-27  8:36 UTC (permalink / raw)
  To: Parker, Ron, Philip Kaludercic, Stefan Monnier; +Cc: emacs-devel

> From: "Parker, Ron" <Ron.Parker@netapp.com>
> Date: Thu, 18 Apr 2024 18:29:19 +0000
> 
> When I start Emacs on a fresh install of my configuration, I have to
> restart a couple times before all of the packages successfully install.
> Upon trying to debug it, I ran into an error with seq being unable to
> load seq-25.el and reduced it to a minimal test case.
>  
> Put the following in an empty directory as init.el:
>  
>   (setq debug-on-error t
>         package-install-upgrade-built-in t)
>   (package-install 'seq)
>  
> then in the directory run:
>  
>   emacs -Q --init-directory $(pwd) -l init.el
>  
> When I do this, I get the following error:
>  
>   Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "seq-25")
>     require(seq-25)
>     (if (version< emacs-version "25") (require 'seq-24) (require 'seq-25))
>     load-with-code-conversion("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq..."
> "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq..." nil t)
>     #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32>
> (("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq" . 76))
>     mapc(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32>
> (("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq" . 76)))
>     package--reload-previously-loaded(#s(package-desc :name seq :version (2 24) :summary "Sequence
> manipulation functions" :reqs nil :kind nil :archive nil :dir
> "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24" :extras ((:keywords "sequences") (:maintainer nil .
> emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
> signed nil))
> 
>     package-activate-1(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation
> functions" :reqs nil :kind nil :archive nil :dir "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24" :extras
> ((:keywords "sequences") (:maintainer nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" .
> nicolas@petton.fr)) (:url . https://elpa.gnu.org/packages/seq.html) (:commit .
> "27a90793a13f149121180e864fa53d68b9eac0b3")) :signed nil) :reload :deps)
> 
>     package-unpack(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation functions"
> :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer nil .
> emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
> signed nil))
> 
>     #f(compiled-function () #<bytecode 0x1511bb8ba7930de3>)()
> 
>     package--with-response-buffer-1(https://elpa.gnu.org/packages/ #f(compiled-function () #<bytecode
> 0x1511bb8ba7930de3>) :file "seq-2.24.tar" :async nil :error-function #<subr
> F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_79> :noerror nil)
> 
>     package-install-from-archive(#s(package-desc :name seq :version (2 24) :summary "Sequence
> manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer
> nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
> signed nil))
> 
>     package-download-transaction((#s(package-desc :name seq :version (2 24) :summary "Sequence
> manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer
> nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
> signed nil)))
>     package-install(seq)
>     load-with-code-conversion("/Users/<username>/.emacs-test-elpa-seq/init.el"
> "/Users/<username>/.emacs-test-elpa-seq/init.el" nil t)
>     command-line-1(("-l" "init.el" "init.el"))
>     command-line()
>     normal-top-level()
>  
> Emacs  : GNU Emacs 29.1 (build 1, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build
> 23C71))
> 
> Package: seq

Stefan and Philip, any comments or suggestions?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: seq; Error during initial package install
  2024-04-27  8:36 ` Eli Zaretskii
@ 2024-04-27  9:17   ` Philip Kaludercic
  2024-04-27 14:40     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Philip Kaludercic @ 2024-04-27  9:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Parker, Ron, Stefan Monnier, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Parker, Ron" <Ron.Parker@netapp.com>
>> Date: Thu, 18 Apr 2024 18:29:19 +0000
>> 
>> When I start Emacs on a fresh install of my configuration, I have to
>> restart a couple times before all of the packages successfully install.
>> Upon trying to debug it, I ran into an error with seq being unable to
>> load seq-25.el and reduced it to a minimal test case.
>>  
>> Put the following in an empty directory as init.el:
>>  
>>   (setq debug-on-error t
>>         package-install-upgrade-built-in t)
>>   (package-install 'seq)
>>  
>> then in the directory run:
>>  
>>   emacs -Q --init-directory $(pwd) -l init.el
>>  
>> When I do this, I get the following error:
>>  
>>   Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "seq-25")
>>     require(seq-25)
>>     (if (version< emacs-version "25") (require 'seq-24) (require 'seq-25))

The issue is that package.el is re-loading the built-in seq, but all the
seq.el on ELPA does is try to load the right version of seq (for Emacs
24 or 25, as seen above).  At this point the load-path has not been
modified yet, which is why `require' fails.  I see two solutions:

1. Temporarily prepends the directory to load-path:

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index ab1731aeb54..9eea1c45db5 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -871,8 +871,9 @@ package--reload-previously-loaded
           (unless (equal (file-name-base library)
                          (format "%s-autoloads" (package-desc-name pkg-desc)))
             (push (cons (expand-file-name library dir) recent-index) result))))
-      (mapc (lambda (c) (load (car c) nil t))
-            (sort result (lambda (x y) (< (cdr x) (cdr y))))))))
+      (let ((load-path (cons dir load-path)))
+        (mapc (lambda (c) (load (car c) nil t))
+              (sort result (lambda (x y) (< (cdr x) (cdr y)))))))))
 
 (defun package-activate-1 (pkg-desc &optional reload deps)
   "Activate package given by PKG-DESC, even if it was already active.

2. Loads the autoload file before reloading the package, thus updating
load-path, since this is done in the autoloads file:

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index ab1731aeb54..bed0122e8ca 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -898,10 +898,10 @@ package-activate-1
       (if (listp package--quickstart-pkgs)
           ;; We're only collecting the set of packages to activate!
           (push pkg-desc package--quickstart-pkgs)
-        (when reload
-          (package--reload-previously-loaded pkg-desc))
         (with-demoted-errors "Error loading autoloads: %s"
-          (load (package--autoloads-file-name pkg-desc) nil t)))
+          (load (package--autoloads-file-name pkg-desc) nil t))
+        (when reload
+          (package--reload-previously-loaded pkg-desc)))
       ;; Add info node.
       (when (file-exists-p (expand-file-name "dir" pkg-dir))
         ;; FIXME: not the friendliest, but simple.

I cannot test this right now, since there appears to be an unrelated
issue with elpa.gnu.org's signing keys?

>>     load-with-code-conversion("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq..."
>> "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq..." nil t)
>>     #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32>
>> (("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq" . 76))
>>     mapc(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_32>
>> (("/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24/seq" . 76)))
>>     package--reload-previously-loaded(#s(package-desc :name seq :version (2 24) :summary "Sequence
>> manipulation functions" :reqs nil :kind nil :archive nil :dir
>> "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24" :extras ((:keywords "sequences") (:maintainer nil .
>> emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
>> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
>> signed nil))
>> 
>>     package-activate-1(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation
>> functions" :reqs nil :kind nil :archive nil :dir "/Users/<username>/.emacs-test-elpa-seq/elpa/seq-2.24" :extras
>> ((:keywords "sequences") (:maintainer nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" .
>> nicolas@petton.fr)) (:url . https://elpa.gnu.org/packages/seq.html) (:commit .
>> "27a90793a13f149121180e864fa53d68b9eac0b3")) :signed nil) :reload :deps)
>> 
>>     package-unpack(#s(package-desc :name seq :version (2 24) :summary "Sequence manipulation functions"
>> :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer nil .
>> emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
>> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
>> signed nil))
>> 
>>     #f(compiled-function () #<bytecode 0x1511bb8ba7930de3>)()
>> 
>>     package--with-response-buffer-1(https://elpa.gnu.org/packages/ #f(compiled-function () #<bytecode
>> 0x1511bb8ba7930de3>) :file "seq-2.24.tar" :async nil :error-function #<subr
>> F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_79> :noerror nil)
>> 
>>     package-install-from-archive(#s(package-desc :name seq :version (2 24) :summary "Sequence
>> manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer
>> nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
>> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
>> signed nil))
>> 
>>     package-download-transaction((#s(package-desc :name seq :version (2 24) :summary "Sequence
>> manipulation functions" :reqs nil :kind tar :archive "gnu" :dir nil :extras ((:keywords "sequences") (:maintainer
>> nil . emacs-devel@gnu.org) (:authors ("Nicolas Petton" . nicolas@petton.fr)) (:url .
>> https://elpa.gnu.org/packages/seq.html) (:commit . "27a90793a13f149121180e864fa53d68b9eac0b3")) :
>> signed nil)))
>>     package-install(seq)
>>     load-with-code-conversion("/Users/<username>/.emacs-test-elpa-seq/init.el"
>> "/Users/<username>/.emacs-test-elpa-seq/init.el" nil t)
>>     command-line-1(("-l" "init.el" "init.el"))
>>     command-line()
>>     normal-top-level()
>>  
>> Emacs  : GNU Emacs 29.1 (build 1, aarch64-apple-darwin23.2.0, NS appkit-2487.30 Version 14.2.1 (Build
>> 23C71))
>> 
>> Package: seq
>
> Stefan and Philip, any comments or suggestions?

-- 
	Philip Kaludercic on peregrine



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: seq; Error during initial package install
  2024-04-27  9:17   ` Philip Kaludercic
@ 2024-04-27 14:40     ` Stefan Monnier
       [not found]       ` <MW4PR06MB8948E521FC9D0C00DDE24A16E9152@MW4PR06MB8948.namprd06.prod.outlook.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2024-04-27 14:40 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: Eli Zaretskii, Parker, Ron, emacs-devel

> The issue is that package.el is re-loading the built-in seq, but all the
> seq.el on ELPA does is try to load the right version of seq (for Emacs
> 24 or 25, as seen above).

I suspect the OP does not intend for `seq` to be fetched and reloaded
from ELPA, so the better fix might be to make sure `package.el` sticks
to the built-in `seq`.


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: seq; Error during initial package install
       [not found]       ` <MW4PR06MB8948E521FC9D0C00DDE24A16E9152@MW4PR06MB8948.namprd06.prod.outlook.com>
@ 2024-04-27 18:24         ` Philip Kaludercic
  2024-04-27 21:04         ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Philip Kaludercic @ 2024-04-27 18:24 UTC (permalink / raw)
  To: Parker, Ron; +Cc: Stefan Monnier, Eli Zaretskii, emacs-devel@gnu.org

"Parker, Ron" <Ron.Parker@netapp.com> writes:

>>> The issue is that package.el is re-loading the built-in seq, but all the
>>> seq.el on ELPA does is try to load the right version of seq (for Emacs
>>> 24 or 25, as seen above).
>
>> I suspect the OP does not intend for `seq` to be fetched and reloaded
>> from ELPA, so the better fix might be to make sure `package.el` sticks
>> to the built-in `seq`.
>
> For my personal use, the built-in 2.23 version of seq is sufficient.
> However, the full case where I ran into this was installing ement.
> Its dependency chain is what is triggering the issue by pulling in
> seq 2.24 from ELPA.
>
> | ELPA Package    | Dependency      | ELPA Version |
> |-----------------+-----------------+--------------|
> | ement 0.15      | transient 0.3.7 |        0.6.0 |
> | transient 0.6.0 | seq 2.24        |         2.24 |

Can you try to apply the above patches and see if they help?


-- 
	Philip Kaludercic on barbet



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: seq; Error during initial package install
       [not found]       ` <MW4PR06MB8948E521FC9D0C00DDE24A16E9152@MW4PR06MB8948.namprd06.prod.outlook.com>
  2024-04-27 18:24         ` Philip Kaludercic
@ 2024-04-27 21:04         ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2024-04-27 21:04 UTC (permalink / raw)
  To: Parker, Ron; +Cc: Philip Kaludercic, Eli Zaretskii, emacs-devel@gnu.org

> For my personal use, the built-in 2.23 version of seq is sufficient.
> However, the full case where I ran into this was installing ement.
> Its dependency chain is what is triggering the issue by pulling in
> seq 2.24 from ELPA.
>
> | ELPA Package    | Dependency      | ELPA Version |
> |-----------------+-----------------+--------------|
> | ement 0.15      | transient 0.3.7 |        0.6.0 |
> | transient 0.6.0 | seq 2.24        |         2.24 |

But unless your Emacs is old, the `seq` that's built into Emacs is more
recent than the one in ELPA.


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-27 21:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-18 18:29 seq; Error during initial package install Parker, Ron
2024-04-27  8:36 ` Eli Zaretskii
2024-04-27  9:17   ` Philip Kaludercic
2024-04-27 14:40     ` Stefan Monnier
     [not found]       ` <MW4PR06MB8948E521FC9D0C00DDE24A16E9152@MW4PR06MB8948.namprd06.prod.outlook.com>
2024-04-27 18:24         ` Philip Kaludercic
2024-04-27 21:04         ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.