bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60418: [PATCH] Add :vc keyword to use-package


From: Philip Kaludercic
Subject: bug#60418: [PATCH] Add :vc keyword to use-package
Date: Sat, 06 May 2023 18:50:02 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: soliditsallgood@mailbox.org,  60418@debbugs.gnu.org,
>>   felician.nemeth@gmail.com,  stefankangas@gmail.com
>> Date: Fri, 05 May 2023 17:15:42 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> No, the commit of the latest release is interpreted the same way as
>> >> elpa-admin.el does, namely the last revision that modified the "Version"
>> >> header.  If no such commit can be found, then a message is printed out
>> >> and the installation continues under the assumption that the package is
>> >> using a rolling-release model.
>> >
>> > I thought package-vc-install is used (or at least can be used) to
>> > fetch the latest HEAD from the upstream repository?  I even thought
>> > this was its main raison d'ĂȘtre?
>> >
>> > If that's not true, does it mean we have no means for package users to
>> > track the latest development code of a package?
>> 
>> This is true, for package-vc-install, but the idea was not do this for
>> the :vc keyword to use-package.
>
> But I wrote the above as a comment to a patch to package-vc.el, not to
> use-package.  So why use-package is relevant here?

Because this patch is related to use-package, and a keyword that would
allow for use-package to invoke package-vc-install?

>> My understanding is that the main
>> interest here is to install packages that are not available via package
>> archives.  And as use-package is a popular means of bootstrapping a
>> configuration, it seems the right approach to use the commit of the
>> latest revision, instead of just any commit to avoid instability.
>
> My understanding is that the :rev keyword allows to use any value that
> is acceptable to package-vc-install.  

Right, and what is acceptable to package-vc-install is what is
transitively acceptable to `vc-clone'/`vc-retrieve-tag'.

>                                       I understand that in most cases
> users will want to install the latest, 

I don't know if that is the case.  I might be wrong that the revision of
the latest release is a good default?  Tony, do you think we should add
a user-option to regulate this behaviour.

>                                        but once we decided to support
> :rev, we must allow any valid value there.  Right?

Yes.

>>    By default, this function installs the last revision of the
>>    package available from its repository.  If REV is a string, it
>>    describes the revision to install, as interpreted by the VC
>>    backend.  The special value `:last-release' (interactively, the
>>    prefix argument), will use the commit of the latest release, if
>>    it exists.  The latest revision is determined by the latest
>                      ^^^^^^^^^^^^^^^
> "last release", not "latest revision": you are explaining what the
> previous sentence said.

Whoops, of course.

>>    revision to modify the \"Version\" header of the main file.
>> 
>> But I couldn't come up with an elegant way to avoid the passive voice in
>> the last sentence.
>
> Here's one way:
>
>   The last release is the latest revision which changed the
>   \"Version:\" header of the package's main Lisp file.

Yes, sounds good.  Will apply this change.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]