-
Notifications
You must be signed in to change notification settings - Fork 98
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: use nightly-2020-03-25 #427
Conversation
Travis running here: https://travis-ci.org/github/digitalbitbox/bitbox02-firmware/builds/666704674 |
Dockerfile
Outdated
@@ -132,9 +132,11 @@ ENV PATH /opt/lcov-1.14/bin:$PATH | |||
# Install rust compiler | |||
ENV PATH /opt/cargo/bin:$PATH | |||
ENV RUSTUP_HOME=/opt/rustup | |||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/opt/cargo sh -s -- --default-toolchain 1.42.0 -y | |||
# Also update ./rust-toolchain when changing the default toolchain. | |||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/opt/cargo sh -s -- --default-toolchain nightly-2020-03-25 -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rust-toolchain is very helpful! Could we do something like this?
COPY rust-toolchain /tmp/
RUN ... | CARGO_HOME=/opt/cargo sh -s -- --default-toolchain $(cat /tmp/rust-toolchain) -y
So to attempt to keep them in sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be fragile, e.g. if someone slips in a newline in there, or deletes the file, it will break the docker build without anyone noticing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Someone could also update Dockerfile while forgetting to update rust-toolchain or the other way around. :)
Either way it fine with me!
With this change we technically don't need the |
I'd still keep it with the hope of going beta->stable in the next months. Let's see if we can resist the temptation of nightly :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I would prefer that you cat the rust-toolchain file before approving this PR as @x1ddos wrote. |
I'm not for it:
|
Instead of rust-toolchain, i could add an ENV var to the dockerfile and use it in Downside: works only with CMakeLists, not when running |
TBH that's what code reviews and CIs are for :) If
but it's equivalent to the other solution anyway. |
Ah sorry, forget about |
Plus, if someone submits a change to update |
Solve it any way you want, this string: |
This is to be able to use async/await syntax, which was merged a few days ago into nightly for no_std: rust-lang/rust#69033. This feature will be in beta in April and stable in June, at which point we can start to use those channels again. rust-toolchain file is added as a sanity check or for devs/users not using Docker.
Ok did the |
This is to be able to use async/await syntax, which was merged a few
days ago into nightly for no_std:
rust-lang/rust#69033.
This feature will be in beta in April and stable in June, at which
point we can start to use those channels again.
rust-toolchain file is added as a sanity check or for devs/users not
using Docker.