Closed
Bug 1163214
Opened 9 years ago
Closed 9 years ago
Add a minimum version check for rustc
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox40 affected, firefox41 fixed)
RESOLVED
FIXED
mozilla41
People
(Reporter: rillian, Assigned: rillian)
References
Details
Attachments
(2 files)
696 bytes,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
2.01 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
In addition to checking for the rust compiler's existence, we should check its version against some minimum in case people have old, pre-1.0 installs in their path. from https://bugzilla.mozilla.org/show_bug.cgi?id=1161339#c22
Comment 1•9 years ago
|
||
`rustc --version --verbose` gives each bit of information on a separate line, and so may be easier to parse. Example output on my system: $ rustc --version rustc 1.1.0-nightly (7bd71637c 2015-05-06) (built 2015-05-06) $ rustc --version --verbose rustc 1.1.0-nightly (7bd71637c 2015-05-06) (built 2015-05-06) binary: rustc commit-hash: 7bd71637ca40910dbd310813a19abf76db84f8f6 commit-date: 2015-05-06 build-date: 2015-05-06 host: x86_64-unknown-linux-gnu release: 1.1.0-nightly
Assignee | ||
Comment 2•9 years ago
|
||
Thanks. Looks like the first line is still the same, but parsing the release line might be safer than parsing the single line?
Comment 3•9 years ago
|
||
Right, the first line is the same. I don’t know what language these checks are written in, but if it’s something like bash this should work: `rustc -Vv|grep release:|cut -d' ' -f2`
Assignee | ||
Comment 4•9 years ago
|
||
Incidental fixup
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Simon Sapin (:SimonSapin) from comment #3) > Right, the first line is the same. I don’t know what language these checks > are written in, but if it’s something like bash this should work: `rustc > -Vv|grep release:|cut -d' ' -f2` Yep, that works. I don't see how it's more reliable than `rustc -V|cut -d' ' -f2` though? The real difficulty is parsing and comparing semvers in bash. :/
Assignee | ||
Comment 6•9 years ago
|
||
How's this? We can add an additional clause to reject 1.0.0 pre-releases next week after the first stable release is published.
Attachment #8604737 -
Flags: review?(ted)
Assignee | ||
Updated•9 years ago
|
Attachment #8604340 -
Flags: review?(ted)
Comment 7•9 years ago
|
||
Comment on attachment 8604737 [details] [diff] [review] Add rustc minimum version check Review of attachment 8604737 [details] [diff] [review]: ----------------------------------------------------------------- ::: configure.in @@ +438,5 @@ > + _RUSTC_MINOR_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 2` > + _RUSTC_EXTRA_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 3 | cut -d + -f 1` > + _RUSTC_PATCH_VERSION=`echo ${_RUSTC_EXTRA_VERSION} | cut -d '-' -f 1` > + _RUSTC_PRERELEASE_VERSION=`echo $_{RUSTC_EXTRA_VERSION} | cut -d '-' -f 2` > + _RUSTC_BUILD_VERSION=`echo ${RUSTC_VERSION} | cut -d . -f 3 | cut -d + -f 2` I would say leave the extra/patch/prerelease/build bits out until we need them.
Attachment #8604737 -
Flags: review?(ted) → review+
Comment 8•9 years ago
|
||
Comment on attachment 8604340 [details] [diff] [review] Align --enable-rust help text Review of attachment 8604340 [details] [diff] [review]: ----------------------------------------------------------------- rs=me to fix formatting stuff like this without explicit review in the future.
Attachment #8604340 -
Flags: review?(ted) → review+
Comment 9•9 years ago
|
||
Oh, sorry, I missed your comment there. If you want to add the "reject prereleases" stuff, then keep that in.
Comment 10•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/399e3553eb7f https://hg.mozilla.org/integration/mozilla-inbound/rev/611907765657
Assignee | ||
Comment 11•9 years ago
|
||
Thanks for the review. I removed the SUFFIX and BUILD variables for now. Post-1.0 rustc is using a train model, which will hopefully keep things regular enough we won't need more than the version number.
Comment 12•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/399e3553eb7f https://hg.mozilla.org/mozilla-central/rev/611907765657
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•