-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustup breaks with cargo-make due to environment variables #3029
Comments
Another error that we're seeing is:
Which I think is our fault, and I have a fix in #3029 . However it's unclear how the rustup update broke that (maybe the culprit isn't the rustup update) Apologies for the low-context issue, I figured given that rustup releases are rare it was more valuable for us to report this bug ASAP and work on figuring out more details afterwards. The |
Note that the following error only appears on Windows:
|
Okay, looking at this further this is really weird. In our "Load cortex target for no_std build" CI task section in this failing job we call:
Looking closely at the error, I see a couple things wrong:
Both of these things seem to be Rustup bugs. The |
If you are doing cross-builds from within invocations of If I'm barking up the wrong tree, please tell me and we can investigate further. |
Maybe a different issue but since the release of the new rustup version, it fails on Windows CI jobs on GitHub. Minimal repro name: Build (Windows)
on:
workflow_dispatch:
jobs:
Windows:
runs-on: windows-2019
steps:
- name: Set up rust
env:
RUSTUP_USE_CURL: 1
run: |
rustup toolchain install nightly
rustup +nightly target add i686-pc-windows-gnu
rustup default nightly-i686-pc-windows-gnu Errors in log
Workaround
Looks like it is the self update causing havoc. Note that it only fails on Windows workers. Linux and macOS didn't have that failure. |
That is a problem with Windows locking the file harder. You can add |
the windows error is very sporadic, see https://github.com/Emilgardis/rustup-windows-issue/runs/7298752016?check_suite_focus=true to circumvent, do what @kinnison suggest, example with - run: rustup set auto-self-update disable
if: contains(runner.os, 'windows')
shell: bash
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal |
Hmm, we're using But I don't think |
unicode-org/icu4x#2170 this confirms it, for whatever reason rustup has decided to use the stable compiler there |
@kinnison @pietroalbini Given that there are no easy ways to "select" a rustup version at this time, would it be a good idea to roll back the release until we know the scope of this problem and can fix it? As far as ICU4X is concerned we can disable some of these tests if we have to, but I'm worried about the wider impact here, it doesn't seem like we're the only ones with this problem, and it's rather hard to debug since I haven't been able to reproduce it locally (I suspect I will be able to on a fresh system) |
What we know so far: #2958 is a part of this The problem is that when you call this ends up with the following invocation: Part of the solution here is probably that But I'm not sure if that's all of it. |
from @kinnison
|
Thinking about it more the |
@sffc @Manishearth from what i remember, cargo-make does not set RUSTC env var. however, cargo-make does set the CARGO env var before calling commands that require a specific toolchain. if a change is needed feel free to open an issue and specify whats wrong with the behavior so i'll know what needs fixing. |
@sagiegurari no, the problem is that when you run |
That may not be the only problem however. cargo-make setting CARGO when needed also seems correct (maybe it should be setting more things?) |
question, rustup manages the rust installations. doesn't it override any existing env var to satisfy the command line request? i could unset stuff but later cargo will set more env vars which in turn mess up rustup again and its all internal rust implementation. so it feels like something that rustup needs to manage maybe? does it make sense? unsetting those 3 env vars is easy and can be worked around now in the makefile env block of any project using the unset capability. |
@sagiegurari I don't think that's the problem. This is in part cargo behavior, and how cargo calls custom subcommands. In general I think the following can be taken as an authoritative statement on what the rustup team's intent is here:
So I don't think "things changing later" is a real problem if the team commits to (and documents) this.
Going to try this! |
I suspect on cargo-make's side, the answer is that it should unset RUSTC and RUSTDOC, and it should either unset CARGO or set it to a toolchain, if specified. |
I think this is relevant #3025 As far as CI goes, trying to update the toolchain on nightly is broken at least (Ubuntu 22.04). I think this can help narrow the problem: This caused my pipeline to pass. And locally, I couldn't install the newest nightly until I did a Somewhere, somehow, someone pushed a bad version, and the only solution is to uninstall and reinstall. |
(note that rustup updates are done via |
We need, at some point, to start to resolve this problem in a way which permits us to give the performance boost we were trying to achieve; without breaking your CI |
I mean, we're also happy to make changes on our end, if cargo-make can be updated to handle this and stuff it's also fine. Such CI tools are popular but I don't think there are actually all too many of them. |
if a cargo subcommand is currently doing from it's own process |
@Manishearth I can unset these 3 env vars by default at the start of cargo-make. that's easy. |
@kinnison btw, mind changing this issue title to something like "new rustup version breaks with |
(title edited) |
A gentle ping: |
From the cargo-make side, this issue was worked around and resolved, but im unsure if rustup want to leave this open to address @kinnison comments: |
Problem
It appears that a recent rustup update today caused our GitHub Actions CI to start failing to install a pinned nightly version.
Passing (7hrs ago): https://github.com/unicode-org/icu4x/actions/runs/2650696918
Failing (1hr ago): https://github.com/unicode-org/icu4x/actions/runs/2652484278
GitHub Actions config file: https://github.com/unicode-org/icu4x/blob/main/.github/workflows/build-test.yml
CC @Manishearth
Steps
View the above CI reports. See how the jobs start failing with messages such as:
and
Possible Solution(s)
No response
Notes
No response
Rustup version
latest
Installed toolchains
nightly-2022-04-05
The text was updated successfully, but these errors were encountered: