From unknown Sun Jun 15 13:01:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#76552: 30; Invalid use-package-vc-valid-keywords value and validation Resent-From: Jonas Bernoulli Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Feb 2025 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76552 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 76552@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174049101729519 (code B ref -1); Tue, 25 Feb 2025 13:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2025 13:43:37 +0000 Received: from localhost ([127.0.0.1]:45370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tmvDk-0007g3-LB for submit@debbugs.gnu.org; Tue, 25 Feb 2025 08:43:37 -0500 Received: from lists.gnu.org ([2001:470:142::17]:47438) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tmvDh-0007fi-JC for submit@debbugs.gnu.org; Tue, 25 Feb 2025 08:43:34 -0500 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 1tmvDZ-0002Jn-1w for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2025 08:43:25 -0500 Received: from mail.hostpark.net ([212.243.197.30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tmvDW-0002ce-9Q for bug-gnu-emacs@gnu.org; Tue, 25 Feb 2025 08:43:24 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 9FCEF164DD for ; Tue, 25 Feb 2025 14:43:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-type:content-type:mime-version:message-id:date:date :subject:subject:from:from; s=sel2011a; t=1740490997; bh=4JPc9fD R+es58NSV+B7G2DWBNlbm52YGlXIBGUAaZUo=; b=mbjfR9a1bFsHJjxF+CYBSjq rAvkdKrDqCxVDvCmX7d3up81JbaT9LuIfrQRQsIfG4A/riJT0z2S5xmar3xQNbD6 y3MxOa8oPhz693eNjeb9aZS7lpAg/cE1N5eD0GmAM36iVDxh6Rxl+eZt2r00K1DG 8FaDcECpEw+OdK0+ACSo= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id DGXkoBhg8O6J for ; Tue, 25 Feb 2025 14:43:17 +0100 (CET) Received: from customer (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.hostpark.net (Postfix) with ESMTPSA id 5300A16475 for ; Tue, 25 Feb 2025 14:43:17 +0100 (CET) From: Jonas Bernoulli Date: Tue, 25 Feb 2025 14:43:16 +0100 Message-ID: <87a5aa6sy3.fsf@bernoul.li> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=212.243.197.30; envelope-from=jonas@bernoul.li; helo=mail.hostpark.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) A Forge user reported that (use-package forge :demand t :vc ( :url "https://github.com/magit/forge.git" :lisp-dir "lisp" :doc "docs/forge.texi")) results in this weird error Error (use-package): Failed to parse package forge: Wrong type \ argument: symbolp, ("lisp" :doc "docs/forge.texi") This has two causes: 1. :doc should, but is not, a member of use-package-vc-valid-keywords. 2. First the plist-but-not-really user input is converted to an alist, which makes it impossible to afterwards check the validity of the encountered keywords, which is what is being attempted. Due to the first issue, the alist looks like ((:url "https://github.com/magit/forge.git") (:lisp-dir "lisp" :doc "docs/forge.texi")) but the subsequent check (reasonably) assumes it would get to look at this instead: ((:url "https://github.com/magit/forge.git") (:lisp-dir "lisp") (:doc "docs/forge.texi")) Possible fixes: - Maybe the plist-but-not-really is in fact a plist, and it can just be treated as such. *use-package* sometimes uses this weirdness (:keyA val1 val2 :keyB val3), but would that actually ever be valid :vc (...HERE...) too? - If no keyword can actually have another keyword as part of its value, then it probably would be appropriate to use #'keywordp as argument to use-package-split-when. And also 3. use-package-vc-valid-keywords contains :ignored-files but that is not mentioned at (info "(emacs) Fetching Package Sources"). Regards, Jonas