-
Notifications
You must be signed in to change notification settings - Fork 279
Switch from rust-toolchain
to rust-toolchain.toml
so we can specify components
#520
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
Conversation
This is failing CI due to the added |
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.
Issues commented inline.
I thought I had fixed the parsing issues somewhere, but I guess I left that in a stash somewhere along with the toml merge changes. |
@thedataking, this does need a Docker update for the |
…lchain.toml` format.
…l using the `toml` library to parse.
I still left them in `provision_rust.sh` as well, even though they're not strictly needed, because it will help to have them cached in the Docker image. Ideally, I think we'd put c2rust itself (or at least parts of it) into the Docker image as well for caching purposes.
f8793f0
to
9fa4fe6
Compare
@thedataking, CI is still failing on |
…st-toolchain.toml`. I believe they should be in sync because this one is produced by copying the root one.
…chain.toml` file now.
…`query_toml.py`, which is also a CLI and is used in `docker_build.sh` and `provision_mac.sh` to query the channel now.
… `toml-edit` (as `cargo` does).
21ef06f
to
528fba5
Compare
This switches all
rust-toolchain
s torust-toolchain.toml
s so we can specify components (and targets, etc. where needed).The benefit of this is that
cargo
will automatically download the needed components and targets instead of erroring, which is very useful when upgrading our nightly. CI breaks when this happens, and we can't simultaneously support multiple nightly versions (across branches and PRs) as we migrate. It is still useful for the Docker containers to pre-install them, as that saves on re-downloading them every time, but it should prevent hard errors. Furthermore, it is useful when developing locally as well.This should (hopefully) make #513 pass CI.
Previously, we would emit a
rust-toolchain
file in the transpiled crate if nightly features we needed. That was simple with arust-toolchain
file, but withrust-toolchain.toml
, it's more complex, as we don't want to override fields in an existingrust-toolchain.toml
that we don't have to. As this is more complex and isn't currently needed for our existing tests and CI, I'll fix it in a future PR that merges/updates (i.e. override thechannel
, append tocomponents
andtargets
, etc.) therust-toolchain.toml
instead of wholly replacing it.c2rust/c2rust-transpile/src/build_files/mod.rs
Lines 259 to 265 in a91e816