guix-devel
[Top][All Lists]
Advanced

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

Re: Sanitizer of record fields?


From: Maxime Devos
Subject: Re: Sanitizer of record fields?
Date: Thu, 8 Sep 2022 11:32:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0


On 08-09-2022 09:59, zimoun wrote:
We could add a lint checker.  Is it a “good” idea?
We already have one, 'check-license'.
Because lint is not always applied, a check should be done when running
’make’ or a special target.  Is it a “good” idea?

I suppose it is a possibility, but it adds a few seconds to every 'make':

time ./pre-inst-env guix lint --checkers=license
make  all-recursive  [...]
gnu/packages/qt.scm:1373:13: qtshadertools@6.3.1: invalid license field
gnu/packages/tex.scm:11816:2: texlive-setspace@59745: invalid

real    0m1,492s
user    0m3,331s
sys    0m0,214s

As such, here's an alternative proposal: instead of checking it at compile-time (which is currently impossible), let's check them at runtime, with a field sanitizer.

Given that, unless I'm mistaken, build-aux/compile-all.scm loads every Guix
module anyway, and given that 'license' isn't thunked or delayed, 'the runtime
check' would also a compile-time check.

(Performance impact on "guix ..." commands would need to be checked.)

Alternatively, some error checking could be added to the website code, to indicate which package and which is wrong.  Or maybe the website code can run the 'license'
linter first.

Greetings,
Maxime.

Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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