Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
buildRustCrate: Replace hyphen with underscore in env variables #88054
This fixes a bug that prevents encoding_c from building.
Motivation for this change
I tried to use crate2nix to build a Rust package that depends on mozjs. This depends on encoding_c, which passes this output from
Which gets rewritten to this env file:
This is invalid; nix doesn't allow environment variables to contain hyphens. In any case, it also doesn't match up with how mozjs is trying to reference it here. The mozjs build script expects it to be spelled
I couldn't find any good docs on this, so just as a note, I actually ran that test suite by executing
Running it against master, with the test case cherry-picked
Running against my patch branch
In any case, @andir, I've added a regression test.
Yeah, back porting sounds good.…
On Tue, May 26, 2020, 8:53 PM Léo Gaspard ***@***.***> wrote: @andir <https://github.com/andir> Do you think this should be backported? I'm a bit cautious about it, seeing as it's infrastructure, but on the other hand as it's a quite significant bug…? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#88054 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAE365C6SGYLAPO7LPF56WTRTQF3XANCNFSM4ND4TNGQ> .