* bug#52588: A linter & styler for %outputs -> #$output:...?
@ 2021-12-17 21:51 Maxime Devos
2021-12-19 22:16 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Maxime Devos @ 2021-12-17 21:51 UTC (permalink / raw)
To: 52588
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#52588: A linter & styler for %outputs -> #$output:...?
2021-12-17 21:51 bug#52588: A linter & styler for %outputs -> #$output:...? Maxime Devos
@ 2021-12-19 22:16 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2021-12-19 22:16 UTC (permalink / raw)
To: Maxime Devos; +Cc: 52588
Hi,
Maxime Devos <maximedevos@telenet.be> skribis:
> 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.
Yes, the intent was to still provide ‘%build-inputs’ & co. for backward
compatibility.
There are a few build systems where these variables seemed to be mostly
unused already, so I didn’t bother reintroducing them; that’s the case
of ‘qt-build-system’ and ‘julia-build-system’, for instance. But these
are the exception.
In the case of meson cross-compilation, it was an oversight.
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-19 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 21:51 bug#52588: A linter & styler for %outputs -> #$output:...? Maxime Devos
2021-12-19 22:16 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).