guix-patches
[Top][All Lists]
Advanced

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

[bug#49780] [PATCH 00/14] import: Use PARSE-COMMAND-LINE for options.


From: Sarah Morgensen
Subject: [bug#49780] [PATCH 00/14] import: Use PARSE-COMMAND-LINE for options.
Date: Tue, 03 Aug 2021 11:54:49 -0700

Hi,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi Sarah,
>
> Sarah Morgensen <iskarian@mgsn.dev> skribis:
>
>> I noticed that we have an ARGS-FOLD* wrapper called PARSE-COMMAND-LINE which 
>> has
>> the same invalid argument message as the importers, the same argument 
>> handler,
>> and has an option hint feature. So let's use that in the importers.
>>
>> The change is identical across all importers, and the semantics as far as 
>> return
>> value are identical, so this should just be a drop-in.
>
> Neat, that’s a welcome change.  I hope you won’t hate me for suggesting
> this, but I think such systematic API evolution changes can go in a
> single commit.  WDYT?

Ha! No problem. v2 sent.

>
> Nitpick:
>
> guix/scripts/import/go.scm (guix-import-go)[parse-options]: Use
> ^
> You need a ‘*’ at the beginning of the line.

Of course I missed that. Fixed in v2. If only etc/committer didn't choke
on it because git-diff decided that literal strings are function
definitions... Looking at it now, git 2.32+ has a built-in function regex
for Scheme, so if we add

  *.scm   diff=scheme

to a .gitattributes file, we should get better diff headers. Quick
testing shows that if we have nested functions, it shows the innermost
one, though. A little modification to the regex can make it show the
topmost one. This is what we want for etc/committer, but is it what we
want elsewhere? I'll send a patch shortly.

>
> Thanks!
>
> Ludo’.

--
Sarah





reply via email to

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