From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic 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: Mon, 14 Nov 2022 11:31:33 +0000 Message-ID: <878rkd3h7u.fsf@posteo.net> References: <87o7tbq3l6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11770"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59226@debbugs.gnu.org To: Richard Kim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 15 01:18:27 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 1oujek-0002rj-WF for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Nov 2022 01:18:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouiow-00017d-Ld; Mon, 14 Nov 2022 18:24:54 -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 1ouifz-0003Lu-Tb for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 18:15:43 -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 1ouXh4-0008A0-2D for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 06:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ouXh3-00017C-UQ for bug-gnu-emacs@gnu.org; Mon, 14 Nov 2022 06:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Nov 2022 11:32:01 +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.16684255034261 (code B ref 59226); Mon, 14 Nov 2022 11:32:01 +0000 Original-Received: (at 59226) by debbugs.gnu.org; 14 Nov 2022 11:31:43 +0000 Original-Received: from localhost ([127.0.0.1]:49057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouXgl-00016e-4Q for submit@debbugs.gnu.org; Mon, 14 Nov 2022 06:31:43 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]:38335) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ouXgi-00016M-My for 59226@debbugs.gnu.org; Mon, 14 Nov 2022 06:31:41 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A7561240105 for <59226@debbugs.gnu.org>; Mon, 14 Nov 2022 12:31:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668425494; bh=vT9vA1Y3ItjmgdaUr5+YGXMv+sUeEabIJVbed5hJ2Wo=; h=From:To:Cc:Subject:Date:From; b=CEHdyCBuWdRKy/bKkyA/2P1qmJwGilhWkltLBc7cUX8ZLzasTvctFYkOLGckQEfxO dZVaMMJVTQLk3gmTUXS4F6MGzw5FDTcllFcE/nizLaQ+Zw/HZ39MIEcV1WxliSJ6rP N6D2laj/Kcpvvk0+KNfBiLQIze9ZOzP1BVJRVGRr0yUyW/xc+dNnAAseF8cBImgxaV TjW5sBcynxWtdc8rbsRIrvnHapbieidttHR5UlpUoGowlpLNRybKHClsfXOi3yCxK2 O0cT/iHBWXCJcNX9iWETkbVD/+5dYjiTMFtgl5GF3qsXFW0EfamknS9nwiB52kRRvc Jd64GwNwwN9Xw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N9nFd2XbDz9rxF; Mon, 14 Nov 2022 12:31:33 +0100 (CET) In-Reply-To: <87o7tbq3l6.fsf@gmail.com> (Richard Kim's message of "Sat, 12 Nov 2022 13:12:53 -0800") 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:247852 Archived-At: Richard Kim writes: > I would like to report what appears to be a bug in ~package-vc.el~ where 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-initialize) > (package-vc--archives-initialize) > (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))) > (if (and name (package-installed-p name) (eq (progn (or (progn (and (memq ... cl-struct-package-desc-tags) t)) (signal 'wrong-type-argument (list 'package-desc pkg-desc))) (aref pkg-desc 5)) '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 ((pkg-desc (car (cdr (assoc name package-alist #'string=))))) (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) (package-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 package-alist #'string=))))) (if (and name (package-installed-p name) (eq (progn (or (progn ...) (signal ... ...)) (aref pkg-desc 5)) '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* ((x2 (cdr-safe x0))) (let ((name x1) (spec x2)) (let ((pkg-desc (car (cdr (assoc name package-alist ...))))) (if (and name (package-installed-p name) (eq (progn (or ... ...) (aref pkg-desc 5)) '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))))))) > (progn (ignore (symbolp x1)) (let* ((x2 (cdr-safe x0))) (let ((name x1) (spec x2)) (let ((pkg-desc (car (cdr ...)))) (if (and name (package-installed-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 (cdr-safe x0))) (let ((name x1) (spec x2)) (let ((pkg-desc (car ...))) (if (and 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-safe 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 (ignore (symbolp x1)) (let* (...) (let ... ...))))) (setq tail (cdr tail))))) > package-vc-ensure-packages() > (closure (t) (sym val) (custom-set-default sym val) (package-vc-ensure-packages))(package-vc-selected-packages ((treemacs-projectile :lisp-dir "src/extra" :main-file "treemacs-projectile.el" :url "https://github.com/Alexander-Miller/treemacs"))) > custom-initialize-reset(package-vc-selected-packages (funcall #'(closure (t) nil "" 'nil))) > custom-declare-variable(package-vc-selected-packages (funcall #'(closure (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))))) :set (closure (t) (sym val) (custom-set-default sym val) (package-vc-ensure-packages)) :version "29.1") > eval-buffer(# nil "/home/kimr/opt/emacs29/20221112/share/emacs/29.0.5..." nil t) ; Reading at buffer position 6633 > load-with-code-conversion("/home/kimr/opt/emacs29/20221112/share/emacs/29.0.5..." "/home/kimr/opt/emacs29/20221112/share/emacs/29.0.5..." nil nil) > 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/.emacs-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.