GNU bug report logs -
#63541
[PATCH] ; Fix use-package :vc keyword when byte-compiled
Previous Next
Reported by: Steven Allen <steven <at> stebalien.com>
Date: Tue, 16 May 2023 23:13:01 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63541 in the body.
You can then email your comments to 63541 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63541
; Package
emacs
.
(Tue, 16 May 2023 23:13:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Steven Allen <steven <at> stebalien.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 16 May 2023 23:13:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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.
--
2.40.1
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63541
; Package
emacs
.
(Thu, 18 May 2023 19:55:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 63541 <at> debbugs.gnu.org (full text, mbox):
Steven Allen <steven <at> stebalien.com> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63541
; Package
emacs
.
(Fri, 19 May 2023 15:17:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 63541 <at> debbugs.gnu.org (full text, mbox):
On Thu, May 18 2023 19:54, Philip Kaludercic wrote:
> Steven Allen <steven <at> stebalien.com> 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/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63541
; Package
emacs
.
(Sat, 20 May 2023 16:51:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 63541 <at> debbugs.gnu.org (full text, mbox):
Tony Zorman <soliditsallgood <at> mailbox.org> writes:
> On Thu, May 18 2023 19:54, Philip Kaludercic wrote:
>> Steven Allen <steven <at> stebalien.com> 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.
OK, I'll apply it in that case.
> 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?
I'm not a professional software engineer, so I don't know what this
means :/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63541
; Package
emacs
.
(Sun, 21 May 2023 09:33:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 63541 <at> debbugs.gnu.org (full text, mbox):
On Sat, May 20 2023 16:50, Philip Kaludercic wrote:
>> 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?
>
> I'm not a professional software engineer,
Me neither, so don't worry about it :)
> so I don't know what this means :/
Basically, I was wondering whether it'd be possible to write a test that
byte compiles some statement and then checks the relevant expansion of
the macro. This way, whenever the (now correct) code changes in the
future (for whatever reason—most likely a refactor, I guess), one could
verify that the functionality wasn't inadvertently broken again.
--
Tony Zorman | https://tony-zorman.com/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63541
; Package
emacs
.
(Fri, 26 May 2023 04:55:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 63541 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Here's a version of the patch with a test.
(sent to the right list this time)
[0001-Fix-use-package-vc-keyword-when-byte-compiled.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63541
; Package
emacs
.
(Wed, 31 May 2023 13:23:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 63541 <at> debbugs.gnu.org (full text, mbox):
> Cc: 63541 <at> debbugs.gnu.org
> From: Steven Allen <steven <at> stebalien.com>
> Date: Thu, 25 May 2023 21:54:29 -0700
>
> Here's a version of the patch with a test.
Philip, should I install this?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63541
; Package
emacs
.
(Wed, 31 May 2023 21:54:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 63541 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: 63541 <at> debbugs.gnu.org
>> From: Steven Allen <steven <at> stebalien.com>
>> Date: Thu, 25 May 2023 21:54:29 -0700
>>
>> Here's a version of the patch with a test.
>
> Philip, should I install this?
I don't value my own input, since this is related to use-package which I
do not use, but from a general intuition it looks fine.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 03 Jun 2023 07:29:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Steven Allen <steven <at> stebalien.com>
:
bug acknowledged by developer.
(Sat, 03 Jun 2023 07:29:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 63541-done <at> debbugs.gnu.org (full text, mbox):
> From: Philip Kaludercic <philipk <at> posteo.net>
> Cc: Steven Allen <steven <at> stebalien.com>, soliditsallgood <at> mailbox.org,
> 63541 <at> debbugs.gnu.org
> Date: Wed, 31 May 2023 21:53:41 +0000
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Cc: 63541 <at> debbugs.gnu.org
> >> From: Steven Allen <steven <at> stebalien.com>
> >> Date: Thu, 25 May 2023 21:54:29 -0700
> >>
> >> Here's a version of the patch with a test.
> >
> > Philip, should I install this?
>
> I don't value my own input, since this is related to use-package which I
> do not use, but from a general intuition it looks fine.
Thanks for the feedback. I've now installed this on the master
branch, and I'm closing the bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 01 Jul 2023 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.