guix-devel
[Top][All Lists]
Advanced

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

Re: patch-shebang and Rust - Change on core-updates?


From: Ludovic Courtès
Subject: Re: patch-shebang and Rust - Change on core-updates?
Date: Sat, 25 Jan 2020 18:26:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi,

Danny Milosavljevic <address@hidden> skribis:

> Rust uses #![...] for something that is definitely not a shebang
> (file-wide feature tests).
>
> Currently, our patch-shebang[1] emits a lot of warnings because of those.
>
> Should we change patch-shebang to ignore lines starting with "#![" ?
>
> If so, how?  There's some get-char* magic that I don't understand.
>
> The easiest way would be to add peek-char after the two calls to get-char*,
> but not sure if that would work.
>
> Alternatively, we could adapt the regexp.
>
>>(define patch-shebang
>>  (let ((shebang-rx (make-regexp 
>> "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*([[:graph:]]*)(.*)$")))
>
> The [[:graph:]]+ would have to change to something like 
>
>   [[:graph-without-opening-bracket:]][[:graph:]]+

Or rather: /[[:graph:]]+ ?

A real shebang has to be an absolute file name so it must start with a
slash.

If that works for you, I’d say it’s OK to do that on ‘core-updates’.

Thanks,
Ludo’.



reply via email to

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