-
Notifications
You must be signed in to change notification settings - Fork 729
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
--rust-target
beta and nightly suffixes
#3152
Comments
Kangie
added a commit
to Kangie/meson
that referenced
this issue
Feb 25, 2025
In 0.71.0 the bindgen output for invalid rust targets was changed to "«version» is not a valid Rust target". This breaks the existing detection. Further investigation revealed that from 0.71.0 we probably don't need to do this check; "all*" Rust versions will be accepted as valid and converted internally to an appropriate target. Bindgen does not like `-beta` or `-nightly` suffixes, we'll have to address that separately depending on the outcome of rust-lang/rust-bindgen#3152. See-also: rust-lang/rust-bindgen#2993 Signed-off-by: Matt Jolly <kangie@gentoo.zip>
Kangie
added a commit
to Kangie/meson
that referenced
this issue
Feb 25, 2025
In 0.71.0 the bindgen output for invalid rust targets was changed to "«version» is not a valid Rust target". This breaks the existing detection. Further investigation revealed that from 0.71.0 we probably don't need to do this check; "all*" Rust versions will be accepted as valid and converted internally to an appropriate target. Bindgen does not like `-beta` or `-nightly` suffixes, we'll have to address that separately depending on the outcome of rust-lang/rust-bindgen#3152. See-also: rust-lang/rust-bindgen#2993 Signed-off-by: Matt Jolly <kangie@gentoo.zip>
Meson dev here, I think this is actually our bug. We should be stripping the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#2993 loosened
--rust-target
parsing to accept "any*" Rust version output.Unfortunately, this does not include all of the possible
rustc --version
output varieties. The following apparently-valid version strings result inerror: invalid value '...' for '--rust-target <RUST_TARGET>': "..." is not a valid Rust target
:Some consumers of Rust / bindgen (e.g. Meson via the Rust module and
rust.bindgen()
) pass this version info into bindgen as a--rust-target
: e.g. as--rust-target=1.87.0-nightly
.How should this be handled?
I see two options:
1.86.0-beta*
as1.86.0
-nightly
suffix is special-cased to be the same as passingnightly
I'm not sure which option (if either) is desirable, however:
I'll already need to update Meson's Rust module to handle the #2993-changed "invalid Rust target" output; if you have any suggestions on how a build system should use the
--rust-target
option please let me know.Downstream bug: https://bugs.gentoo.org/949593
The text was updated successfully, but these errors were encountered: