From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tony Zorman via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#63541: [PATCH] ; Fix use-package :vc keyword when byte-compiled Date: Fri, 19 May 2023 17:16:20 +0200 Message-ID: <87wn14wdvf.fsf@hyperspace> References: <20230516231204.40043-1-steven@stebalien.com> <87a5y1za7p.fsf@posteo.net> Reply-To: Tony Zorman Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37434"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63541@debbugs.gnu.org, Steven Allen To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 19 17:17:34 2023 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 1q01rJ-0009K1-KF for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 May 2023 17:17:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q01qs-0002KY-BR; Fri, 19 May 2023 11:17:06 -0400 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 1q01qq-0002K9-JB for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 11:17:05 -0400 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 1q01qo-0004Sl-Pa for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 11:17:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q01qo-0000dC-6g for bug-gnu-emacs@gnu.org; Fri, 19 May 2023 11:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tony Zorman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 May 2023 15:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63541 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 63541-submit@debbugs.gnu.org id=B63541.16845093982386 (code B ref 63541); Fri, 19 May 2023 15:17:02 +0000 Original-Received: (at 63541) by debbugs.gnu.org; 19 May 2023 15:16:38 +0000 Original-Received: from localhost ([127.0.0.1]:57119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q01qP-0000cQ-Ns for submit@debbugs.gnu.org; Fri, 19 May 2023 11:16:38 -0400 Original-Received: from mout-p-201.mailbox.org ([80.241.56.171]:55106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q01qN-0000cB-Dg for 63541@debbugs.gnu.org; Fri, 19 May 2023 11:16:36 -0400 Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4QN9RC0ZV4z9sRM; Fri, 19 May 2023 17:16:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1684509383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ucMnq/JZVajYOE/EOXKk2ilrMY4ii34O/Hk8FRYGvSU=; b=nozYvNXL+w3bJ4/qfpMewHoE7OFTaT+Suk/nA9WuvirDwr2lJ3A7t50ITynimrHuuKyyRb BU+d+lIDaZePyNTtlWJrlPQtMTsiYiMtGQduUkG/nNOI8V+DABtLMntTkCIlBRE4tGeS0T g+NqRdMeTHmHOmPzuRmgwg94CQPuhhGsJuib1sdi+M6E6nR9mAR3ZlT1VnDTG0UbDHR7N/ LaaVKO2mnXFFQt2OPsz1wvNrYKwSV/Sgd4h+AccZfX5gL2iJ/hM8LjGp8A1qaqZW3X1osZ 4R0kCsXFmmd8FQf1kS3Q2Cosa5oh78sIheT8l78JFZIZrPbDhx0Y03ZJpfvSxg== In-Reply-To: <87a5y1za7p.fsf@posteo.net> X-MBO-RS-META: qquhyst9jc97szmhtu6qro531qjopa6r X-MBO-RS-ID: a1ad1861422dba3ae99 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:262003 Archived-At: On Thu, May 18 2023 19:54, Philip Kaludercic wrote: > Steven Allen writes: > >> * lisp/use-package/use-package-core.el (use-package-handler/:vc): >> Return the new 'body'. Otherwise, the entire package declaration gets >> dropped when byte-compiling. >> --- >> lisp/use-package/use-package-core.el | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el >> index 0d99e270a3f..e0e16134ed3 100644 >> --- a/lisp/use-package/use-package-core.el >> +++ b/lisp/use-package/use-package-core.el >> @@ -1619,7 +1619,8 @@ defvar use-package--form) >> ;; See `use-package-handler/:ensure' for an explanation. >> (if (bound-and-true-p byte-compile-current-file) >> (funcall #'use-package-vc-install arg local-path) ; compile time >> - (push `(use-package-vc-install ',arg ,local-path) body)))) ; runtime >> + (push `(use-package-vc-install ',arg ,local-path) body)) ; runtime >> + body)) >> >> (defun use-package-normalize--vc-arg (arg) >> "Normalize possible arguments to the `:vc' keyword. > > CC'ing Tony, since he did most of the work here. Do you have any > comments on this change? Looks fine to me; @Steven thanks for catching this! Seems like I wasn't careful enough when testing with a byte compiled file. I'm not super familiar with the testing infrastructure here, but I wonder whether there is an easy way to write a quick regression test for this? -- Tony Zorman | https://tony-zorman.com/