From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Kim Newsgroups: gmane.emacs.bugs Subject: bug#59226: 29.0.50; unable to load package-vc.el if package-vc-selected-packages is non-nil Date: Tue, 15 Nov 2022 15:04:47 -0800 Message-ID: References: <87o7tbq3l6.fsf@gmail.com> <878rkd3h7u.fsf@posteo.net> 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="24757"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59226@debbugs.gnu.org To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 16 00:06:13 2022 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 1ov50P-0006F2-KJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Nov 2022 00:06:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ov50G-0005SF-B2; Tue, 15 Nov 2022 18:06:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ov50E-0005Rq-Mw for bug-gnu-emacs@gnu.org; Tue, 15 Nov 2022 18:06:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ov50E-0000KF-Eb for bug-gnu-emacs@gnu.org; Tue, 15 Nov 2022 18:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ov50E-0005FY-A7 for bug-gnu-emacs@gnu.org; Tue, 15 Nov 2022 18:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Richard Kim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Nov 2022 23:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59226 X-GNU-PR-Package: emacs Original-Received: via spool by 59226-submit@debbugs.gnu.org id=B59226.166855350920110 (code B ref 59226); Tue, 15 Nov 2022 23:06:02 +0000 Original-Received: (at 59226) by debbugs.gnu.org; 15 Nov 2022 23:05:09 +0000 Original-Received: from localhost ([127.0.0.1]:55480 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov4zM-0005EI-PK for submit@debbugs.gnu.org; Tue, 15 Nov 2022 18:05:09 -0500 Original-Received: from mail-ej1-f54.google.com ([209.85.218.54]:46918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov4zK-0005Di-IR for 59226@debbugs.gnu.org; Tue, 15 Nov 2022 18:05:07 -0500 Original-Received: by mail-ej1-f54.google.com with SMTP id bj12so39885152ejb.13 for <59226@debbugs.gnu.org>; Tue, 15 Nov 2022 15:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=S+Ax8V0AY6SeUYhBQSisS6Ok7sk2896l2IXFHZ9yT/o=; b=qRExACx1YJ+LDSurfuaFT45jwB0o2QoscpHKgPpH5NK6sZXnLVLdjktAhP032AUGzO CibFSRIN0yaa4vMtIzWjzP5e7cJThtZHtUq+OUthG6/BfFzMNiMSyX6zu98rYNFIVH9B ceyqcCQUWV3/j/QFhPmGqKlRSj/oVy28kg0FFHrbzDrsimk5m518X8HyEy0FgxRaUy0Y eAdfzXot9biz9J5bG3obPbleUc+6D8K6VMkLrto2jMVsYGObe+Z/1iLSbi4j4gUKFjFg WBRa6C83Pu+27F9A2RSbMUM0sHrwWvR3CoEVOpE1xNOqVggcKUov5JdBJjKJgFozW3XW Mr7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S+Ax8V0AY6SeUYhBQSisS6Ok7sk2896l2IXFHZ9yT/o=; b=EZHFvxCNVTExbLnDV6nLO7DUytq9ace8bgU6YCDDwDFFrbjkKwG2jvkJ/0hom3Cs4f PDrW5v5RgvrPbuSnLK7HFydUT8Lz3sNm2o9efGF+un3XUJurfp39GkvBA/KpFMYbz7mm Thl8FvMiaK05twnqAmEIx7I/ofidG69dfMfuUPoVUsl3cImfJe8fK92L/mEqPTOliXwe n5vzeDRTo42p5+JswLfKKjk0fbFqaqR8ZhZi0I866Irn0e4aNRzdq4CHPF1LrgnnPhlU 9IHdljp2aIxqQvYiB6nwjuB0SCbImIWwo2Zr4Np1Z2lgL7/PiyhOs8QrhAUvZ88Bx0S8 w40Q== X-Gm-Message-State: ANoB5plcGDtEwHtkGc51zDRC15eobCfBLc6yR6CTlcQx3/jsaugss/uA tx3UEzEDN534vP3PwNs9pYNPEtDvt+CIpY4YVv4= X-Google-Smtp-Source: AA0mqf4I4oswdOavTs68TJGa2LwhT6W6HK68w60VlJ9o1DTTaEjtvis0O86SRdHyRfT5X2tPTMPN6Ss0lxAPw9vyTSg= X-Received: by 2002:a17:906:1416:b0:78d:e869:f328 with SMTP id p22-20020a170906141600b0078de869f328mr14874025ejc.696.1668553499489; Tue, 15 Nov 2022 15:04:59 -0800 (PST) In-Reply-To: <878rkd3h7u.fsf@posteo.net> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:247979 Archived-At: Thanks Philip. I built scratch/package-vc-fixes branch, and verified that the problem reported by me is gone. I would like to ask a follow-up question. I'm trying to use package-vc as a replacement for straight.el in my setup. I've been using straight.el within spacemacs for some time. If you are interested, the details can be found at https://github.com/emacs18/spacemacs/tree/sm-straight The key thing I have not yet figured out is how to activate packages installed by package-vc when emacs starts up. Package activation is done by the latter part of package-vc--unpack-1 function. Would it be possible to split out activation as a separate function? On Mon, 14 Nov 2022 at 03:31, Philip Kaludercic wrote: > > Richard Kim writes: > > > I would like to report what appears to be a bug in ~package-vc.el~ wher= e emacs is > > unable to load this file if ~package-vc-selected-packages~ variable is > > ~not-nil~. To see this problem I created following simple test file: > > > > #+begin_src elisp > > $ cat ~/demo-package-vc-issue > > > > (setq package-vc-selected-packages > > '((treemacs-projectile > > :lisp-dir "src/extra" > > :main-file "treemacs-projectile.el" > > :url "https://github.com/Alexander-Miller/treemacs"))) > > > > (setq debug-on-error t) > > > > (load-library "package-vc.el") > > #+end_src > > > > then following error is reported > > > > #+begin_example > > Debugger entered--Lisp error: (void-function package-vc--archives-initi= alize) > > (package-vc--archives-initialize) > > (cond ((null spec) (package-vc-install name)) ((stringp spec) (packag= e-vc-install name nil spec)) ((listp spec) (package-vc--archives-initialize= ) (package-vc--unpack pkg-desc spec))) > > (if (and name (package-installed-p name) (eq (progn (or (progn (and (= memq ... cl-struct-package-desc-tags) t)) (signal 'wrong-type-argument (lis= t 'package-desc pkg-desc))) (aref pkg-desc 5)) 'vc)) nil (cond ((null spec)= (package-vc-install name)) ((stringp spec) (package-vc-install name nil sp= ec)) ((listp spec) (package-vc--archives-initialize) (package-vc--unpack pk= g-desc spec)))) > > (let ((pkg-desc (car (cdr (assoc name package-alist #'string=3D))))) = (if (and name (package-installed-p name) (eq (progn (or (progn (and ... t))= (signal 'wrong-type-argument (list ... pkg-desc))) (aref pkg-desc 5)) 'vc)= ) nil (cond ((null spec) (package-vc-install name)) ((stringp spec) (packag= e-vc-install name nil spec)) ((listp spec) (package-vc--archives-initialize= ) (package-vc--unpack pkg-desc spec))))) > > (let ((name x1) (spec x2)) (let ((pkg-desc (car (cdr (assoc name pack= age-alist #'string=3D))))) (if (and name (package-installed-p name) (eq (pr= ogn (or (progn ...) (signal ... ...)) (aref pkg-desc 5)) 'vc)) nil (cond ((= null spec) (package-vc-install name)) ((stringp spec) (package-vc-install n= ame nil spec)) ((listp spec) (package-vc--archives-initialize) (package-vc-= -unpack pkg-desc spec)))))) > > (let* ((x2 (cdr-safe x0))) (let ((name x1) (spec x2)) (let ((pkg-desc= (car (cdr (assoc name package-alist ...))))) (if (and name (package-instal= led-p name) (eq (progn (or ... ...) (aref pkg-desc 5)) 'vc)) nil (cond ((nu= ll spec) (package-vc-install name)) ((stringp spec) (package-vc-install nam= e nil spec)) ((listp spec) (package-vc--archives-initialize) (package-vc--u= npack pkg-desc spec))))))) > > (progn (ignore (symbolp x1)) (let* ((x2 (cdr-safe x0))) (let ((name x= 1) (spec x2)) (let ((pkg-desc (car (cdr ...)))) (if (and name (package-inst= alled-p name) (eq (progn ... ...) 'vc)) nil (cond ((null spec) (package-vc-= install name)) ((stringp spec) (package-vc-install name nil spec)) ((listp = spec) (package-vc--archives-initialize) (package-vc--unpack pkg-desc spec))= )))))) > > (let* ((x1 (car-safe x0))) (progn (ignore (symbolp x1)) (let* ((x2 (c= dr-safe x0))) (let ((name x1) (spec x2)) (let ((pkg-desc (car ...))) (if (a= nd name (package-installed-p name) (eq ... ...)) nil (cond (... ...) (... .= ..) (... ... ...)))))))) > > (progn (ignore (consp x0)) (let* ((x1 (car-safe x0))) (progn (ignore = (symbolp x1)) (let* ((x2 (cdr-safe x0))) (let ((name x1) (spec x2)) (let ((= pkg-desc ...)) (if (and name ... ...) nil (cond ... ... ...)))))))) > > (let ((x0 (car tail))) (progn (ignore (consp x0)) (let* ((x1 (car-saf= e x0))) (progn (ignore (symbolp x1)) (let* ((x2 (cdr-safe x0))) (let ((name= x1) (spec x2)) (let (...) (if ... nil ...))))))) (setq tail (cdr tail))) > > (while tail (let ((x0 (car tail))) (progn (ignore (consp x0)) (let* (= (x1 (car-safe x0))) (progn (ignore (symbolp x1)) (let* ((x2 ...)) (let (...= ...) (let ... ...)))))) (setq tail (cdr tail)))) > > (let ((tail package-vc-selected-packages)) (while tail (let ((x0 (car= tail))) (progn (ignore (consp x0)) (let* ((x1 (car-safe x0))) (progn (igno= re (symbolp x1)) (let* (...) (let ... ...))))) (setq tail (cdr tail))))) > > package-vc-ensure-packages() > > (closure (t) (sym val) (custom-set-default sym val) (package-vc-ensur= e-packages))(package-vc-selected-packages ((treemacs-projectile :lisp-dir "= src/extra" :main-file "treemacs-projectile.el" :url "https://github.com/Ale= xander-Miller/treemacs"))) > > custom-initialize-reset(package-vc-selected-packages (funcall #'(clos= ure (t) nil "" 'nil))) > > custom-declare-variable(package-vc-selected-packages (funcall #'(clos= ure (t) nil "" 'nil)) "List of packages that must be installed.\nEach memb.= .." :type (alist :tag "List of packages you want to be installed" :key-type= (symbol :tag "Package") :value-type (choice (const :tag "Any revision" nil= ) (string :tag "Specific revision") (plist :options ((:url string) (:branch= string) (:lisp-dir string) (:main-file string) (:vc-backend symbol))))) :s= et (closure (t) (sym val) (custom-set-default sym val) (package-vc-ensure-p= ackages)) :version "29.1") > > eval-buffer(# nil "/home/kimr/opt/emacs29/2022= 1112/share/emacs/29.0.5..." nil t) ; Reading at buffer position 6633 > > load-with-code-conversion("/home/kimr/opt/emacs29/20221112/share/emac= s/29.0.5..." "/home/kimr/opt/emacs29/20221112/share/emacs/29.0.5..." nil ni= l) > > load("package-vc.el") > > load-library("package-vc.el") > > eval-buffer(# nil "/home/kimr/.emacs-debug-1" nil t) = ; Reading at buffer position 262 > > load-with-code-conversion("/home/kimr/.emacs-debug-1" "/home/kimr/.em= acs-debug-1" nil t) > > load("/home/kimr/.emacs-debug-1" nil t) > > command-line-1(("-l" "/home/kimr/.emacs-debug-1")) > > command-line() > > normal-top-level() > > #+end_example > > Can you try the scratch/package-vc-fixes branch. I haven't merged it > yet, because I might need to revise some commits and I don't want to be > pushing minor fixes to master all the time.