GNU bug report logs - #52588
A linter & styler for %outputs -> #$output:...?

Previous Next

Package: guix;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Fri, 17 Dec 2021 21:52:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guix <at> gnu.org
Subject: A linter & styler for %outputs -> #$output:...?
Date: Fri, 17 Dec 2021 21:51:36 +0000
Hi guix,

With the core-updates-frozen merge, some (i.e., so far one) bug reports
about cross-compilation failing due to %outputs not being defined have
been appearing: https://issues.guix.gnu.org/52574.

(That particular bug was actually introduced in core-updates-frozen!)

To find out how prevalent these issues are, and to prevent them from
being introduced, a linter detecting (assoc-ref %outputs ...) in sexps
and gexps and suggesting to use #$output:... could be useful. This
should be doable with 'gexp->approximate-sexp'.

Also, maybe "guix style" could even be teached to G-expify most S-exps.

Long term, we might want to eliminate %outputs entirely, to make the
wrong thing impossible to do instead of making it easy to break cross-
compilation.

Alternatively, %outputs (& friends?) could be re-introduced,
albeit with #$output and #$(this-package-input ...) being strongly
preferred above %outputs & %build-inputs & friends.

Reintroducing %build-inputs/%build-target-inputs/... could help with
the ‘how do I refer to implicit build inputs from #:configure-flags’
issues that have been cropping up.

Greetings,
Maxime.





This bug report was last modified 3 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.