Subject: Re: [PATCH RFC] Turning Rust/Cargo inputs into “regular” inputs?

From: Ludovic Courtès <[email-masked]>
Date: Mon, 10 Jan 2022 09:58:35 +0100

Hi!

Liliana Marie Prikler <[email-masked]> skribis:

> I suppose adding (package-source rust-cargo) to inputs to preserve the
> old meaning would not make much sense?

No because you need transitivity (that is, you need sources of the
dependencies, too).

> If so, what about having a source output and using (list `(,rust-cargo
> "source") ...)?

AFAICS it wouldn’t help solve the problems I mentioned.

>> Last, the change to ‘inputs’ would introduce a few cycles at the
>> <package> level.  Those cycles vanish when we lower to bags and
>> derivations.  However, because of these cycles, things like ‘guix
>> refresh -l’ may not work; there might be other unexpected and
>> undesired side effects.
> What about making the change incrementally, so that outer layers can
> start adopting the new style while inner layers are being
> rebootstrapped.  I also think it'd make sense to see how we could
> detect cycles through static analysis.

Yeah, we could change things incrementally if that helps.

However, given that ‘guix style’ can automate all the changes, I think
we could just as well change everything at once.  The good thing is that
it allows us that the strategy we choose actually works at scale, in
every case.

>> Some of these cycles could in theory be removed.  For instance,
>> ‘rust-cfg-if’ has an optional dependency on ‘rust-compiler-builtins’,
>> which leads to a cycle, but Cargo won’t let us actually remove that
>> dependency, even though it’s optional.
> Could we rewrite the toml file to tell Cargo it has no power over us? 
> Could we define bootstrap mockups?

Maybe, I don’t know!

Thanks,
Ludo’.