configure should reject rust nightlies that have the "right" version
Categories
(Firefox Build System :: General, defect, P3)
Tracking
(firefox-esr68 unaffected, firefox-esr78 unaffected, firefox79 unaffected, firefox80 wontfix, firefox81 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox79 | --- | unaffected |
firefox80 | --- | wontfix |
firefox81 | --- | fixed |
People
(Reporter: daoshengmu, Assigned: mhentges)
References
(Regression)
Details
(Keywords: in-triage, regression)
Attachments
(3 files)
Building GeckoView failed, when building m-c changeset c34351a5fd6c6bfb76ffd7b86b8757d6d95b581c on Mac OS
error[E0658]: use of unstable library feature 'assoc_int_consts': recently added
0:26.65 --> /gecko-dev/third_party/rust/cranelift-codegen/src/isa/aarch64/lower.rs:325:36
0:26.65 |
0:26.65 325 | if shiftee_bits <= u8::MAX as usize {
0:26.65 | ^^^^^^^
0:26.65 |
0:26.66 = note: see issue #68490 <https://github.com/rust-lang/rust/issues/68490> for more information
0:26.66 = help: add `#![feature(assoc_int_consts)]` to the crate attributes to enable
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
•
|
||
That said... u8::MAX is supposed to be stable as of 1.43, and 1.43 is required to build Firefox 80+, so... how exactly are you getting this error?
Are you using a rustc nightly from the 1.43 era, but pre-dating the stabilization?
Comment 2•4 years ago
|
||
Sorry about this! I caught this post-hoc over on the Cranelift side and fixed it up (u8::MAX
-> std::u8::MAX
), as another user also tripped over it:
https://github.com/bytecodealliance/wasmtime/pull/2047
So, the next re-vendoring of Cranelift should pick up this fix; I can do a dedicated patch on this bug for that, though we re-vendor fairly regularly and the next update will probably happen within a week.
Reporter | ||
Comment 3•4 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #1)
That said... u8::MAX is supposed to be stable as of 1.43, and 1.43 is required to build Firefox 80+, so... how exactly are you getting this error?
Are you using a rustc nightly from the 1.43 era, but pre-dating the stabilization?
I am using rustc 1.43.0-nightly (18c275b42 2020-03-02).
Comment 4•4 years ago
|
||
There you go. We should avoid this at the root, rejecting nightlies that have the right version but are not stable. You'd still be able to use a nightly, but it would have be at least the first one from the following cycle (which, when configure wants 1.43, as it does now, would be 1.44).
Comment 5•4 years ago
|
||
Set release status flags based on info from the regressing bug 1653502
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
We have a minimum rust version required for compilations. For both stable and beta rust compilers, we can trust that they will have all the stabilized features we're expecting.
However, for nightlies, they may "match" our minimum version, but may have been released in the version window before a certain feature we need has been stabilized.
So, when validating rustc version in configure, ensure that the nightly is at least one version newer than our expected version.
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
We have version boundaries around enabling OOM hooking for gkrust-shared. Due to the nature of nightlies, those released on the edge of these boundaries make it difficult to tell whether or not they have the API we're expecting.
To resolve this, gkrust-shared now enables OOM hooking for nightlies on these boundaries, but prints a build warning accordingly.
Assignee | ||
Comment 8•4 years ago
|
||
The Firefox build requires features of Rust 1.43. However, a given Rust 1.43 nightly might be missing components that exist in the stable release.
By bumping the nightly version in the toolchain to 1.44 (first released on March 18), we ensure that we won't run into an unexpected missing feature.
Depends on D87650
Updated•4 years ago
|
Assignee | ||
Comment 9•4 years ago
|
||
While digging into this issue, I uncovered some other details which left us with the following list of notes:
configure
requires the rust version to be>= 1.43
. Technically,nightly-1.43 < stable-1.43
, soconfigure
shouldn't silently accept such nightlies.gkrust-shared
requires the rust version to be>= 1.28
and< 1.44
to enable OOM hooking, and also requires OOM hooking to be enabled in automation.- The rust nightly currently provided by our CI toolchain is
1.43
.
The configure
and gkrust-shared
requirements will conflict if they're both applied strictly, so I opted for the following solution:
- Rather than silently accepting potentially-too-old nightlies,
configure
will now fail if anightly-1.43
is provided. - Our CI toolchain rust nightly is now the first possible
nightly-1.44
gkrust-shared
now eagerly enables OOM hooking when potentially-incompatible nightlies are provided. To avoid surprises, a warning is printed if a potentially-incompatible nightly is in use.
I think this solution is sufficient, though it feels inconsistent that configure
strictly checks the rust version, while gkrust-shared
is more fuzzy and warning-heavy. My reasoning is that configure
warnings are easy to miss among the verbosity, but rust compiler warnings are a little more loud an noticeable.
However, if we'd prefer that configure
is also fuzzy and warning-heavy, let me know.
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/169abf6f4f65 bump maximum gkrust-shared rust version to 1.47 r=glandium https://hg.mozilla.org/integration/autoland/rev/470f5653793e Bump rust nightly toolchain version to 1.44 r=glandium https://hg.mozilla.org/integration/autoland/rev/1e0fdb58ab95 Configure should reject potentially-out-of-date nightlies r=firefox-build-system-reviewers,froydnj
Comment 11•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/169abf6f4f65
https://hg.mozilla.org/mozilla-central/rev/470f5653793e
https://hg.mozilla.org/mozilla-central/rev/1e0fdb58ab95
Description
•