Skip to content

Honor $RUSTUP_HOME #413

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

Merged
merged 3 commits into from
Jan 19, 2024
Merged

Conversation

NCGThompson
Copy link
Contributor

build_system/src/test.rs generates a config.toml that contains a path directly to (what should be) the appropriate rustc binary. However, it incorrectly assumed rustup stores the rustc binaries in ~/.rustup. In actuality, rustup first checks the environment variable RUSTUP_HOME, and defaults to ~/.rustup if the variable is not set. Now build_system/src/test.rs uses the correct path.

If there is a more idiomatic way to encode this please let me know and I'll fix it.

@NCGThompson
Copy link
Contributor Author

Disclaimer: Some of the ui tests failed, but I wasn't able to run those tests before I made this change. Still diagnosing those.

@bjorn3
Copy link
Member

bjorn3 commented Jan 14, 2024

Maybe running rustup which rustc and using the output would be better? That returns the ground truth as used by rustup.

@NCGThompson
Copy link
Contributor Author

Maybe running rustup which rustc and using the output would be better? That returns the ground truth as used by rustup.

Almost done. Should I squash/undo, or should I keep the commit history?

Copy link
Member

@GuillaumeGomez GuillaumeGomez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the nit @antoyo saw, looks good to me.

Co-authored-by: antoyo <antoyo@users.noreply.github.com>
@antoyo antoyo merged commit e4e9365 into rust-lang:master Jan 19, 2024
@antoyo
Copy link
Contributor

antoyo commented Jan 19, 2024

Thanks for your contribution!

@NCGThompson NCGThompson deleted the check-rustup-home-flag branch January 19, 2024 15:55
@NCGThompson NCGThompson restored the check-rustup-home-flag branch January 19, 2024 15:55
@NCGThompson NCGThompson deleted the check-rustup-home-flag branch January 19, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants