fix: update FindRust
to work with rustup v1.28.0
#591
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #590 by applying the following mapping:
$_TOOLCHAIN_OVERRIDE
(override)
(active)
$_TOOLCHAIN_DEFAULT
(default)
(default)
or(active, default)
Rationale
Corrosion would like to find out the path for the active toolchain via
rustup toolchain list --verbose
from the toolchains marked(override)
and/or(default)
: if(override)
is present, then it's active, otherwise(default)
would be active:corrosion/cmake/FindRust.cmake
Lines 423 to 428 in b88ec09
In rustup v1.28.0 beta (or rust-lang/rustup#3225 to be more precise), we have recognized that this output format has become a common source of confusion among users in determining the active toolchain, so we now mark the active toolchain with
(active)
instead. Unfortunately, this has broken corrosion's parsing logic.Verification
Changes verified locally via the following interactions:
Concerns
-URust_TOOLCHAIN
is required to make this work. Has it been somehow set to""
by something?