Subject: Re: [bug#75871] [PATCH 0/1] Partial version support for 'guix refresh --target-version'.

From: Maxim Cournoyer <[email-masked]>
Date: Sat, 22 Feb 2025 21:46:44 +0900

Hi Liliana,

Liliana Marie Prikler <[email-masked]> writes:

> Am Freitag, dem 21.02.2025 um 22:23 +0900 schrieb Maxim Cournoyer:
>> Hi,
>> 
>> Maxim Cournoyer <[email-masked]> writes:
>> 
>> > Hello,
>> > 
>> > This adds support for providing incomplete version strings to 'guix
>> > refresh --target-version', for example allowing to do:
>> > 
>> > $ guix refresh --target-version=46 evince
>> > gnu/packages/gnome.scm:2710:13: evince would be upgraded from 44.3
>> > to 46.3.1
>> > 
>> > The change looks massive because all the importers are adjusted to
>> > support this, but the adjustments needed are mechanical and simple,
>> > hopefully making the review not overly painful.  The most critical
>> > and complex bit may be in the modified 'rewrite-url' procedure,
>> > which is covered by unit tests.
>> 
>> I'll merge this is a 3 days if nobody objects.
> Not an objection, but two questions.
>
> First, regarding the handling of multiple packages:  Does 
>   $ guix refresh
>     --target-version=46 evince epiphany gnome-shell … \
>     --target-version=4 gtk …
> do what one would expect and update evince, gnome-shell etc. to
> 46.whatever and gtk etc. to 4.something?

I don't think that's supported, at least I never considered this use
case when --target-version was introduced.  I'm not sure what's the
default behavior of our parser; perhaps it uses the last value provided?

> Second, should we also have a postfix notation (e.g. evince~46 or
> evince=46.*) to ease typing?

I thought about adding something like 'evince=^46', which would be nice
to have, but can/should be added separately given this change is already
huge.

-- 
Thanks,
Maxim