Skip to content
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

Determine rust channel by parsing rustc output if env vars do not exist #163

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

itsCryne
Copy link
Contributor

The RUSTUP_TOOLCHAIN environment variable might not always be present. This is the case for e.g. NixOS where rust is routinely not installed via rustup, thus not setting this env var, causing build failures. Instead, build.rs will now run rustc -V and check if the output contains the word "nightly".

The RUSTUP_TOOLCHAIN environment variable might not always be present.
This is the case for e.g. NixOS where rust is routinely not installed via
rustup, thus not setting this env var, causing build failures.
Instead, build.rs will now run `rustc -V` and check if the output contains the
word "nightly".
@EightFactorial
Copy link
Collaborator

EightFactorial commented Jul 13, 2024

The copy of rustc in your path, if there even is one, isn't necessarily the version being used to build the project.

Maybe use RUSTUP_TOOLCHAIN or fall back to the RUSTC environment variable?

@itsCryne itsCryne marked this pull request as draft July 13, 2024 13:05
@itsCryne
Copy link
Contributor Author

This will now also give an error if the beta channel is used

@itsCryne itsCryne marked this pull request as ready for review July 13, 2024 13:45
@itsCryne itsCryne changed the title Determine rust channel by parsing rustc output Determine rust channel by parsing rustc output if env vars do not exist Jul 13, 2024
@itsCryne
Copy link
Contributor Author

Is there anything left to do before this can get reviewed/merged?

Copy link
Collaborator

@mat-1 mat-1 left a comment

Choose a reason for hiding this comment

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

Thank you :)

@mat-1 mat-1 merged commit 4ee0b78 into azalea-rs:main Jul 19, 2024
1 check passed
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.

3 participants