Switch from rust-toolchain to rust-toolchain.toml so we can specify components#520
Merged
Switch from rust-toolchain to rust-toolchain.toml so we can specify components#520
rust-toolchain to rust-toolchain.toml so we can specify components#520Conversation
fw-immunant
reviewed
Jul 13, 2022
Contributor
Author
|
This is failing CI due to the added |
fw-immunant
reviewed
Jul 13, 2022
fw-immunant
reviewed
Jul 13, 2022
fw-immunant
reviewed
Jul 13, 2022
fw-immunant
requested changes
Jul 13, 2022
Contributor
fw-immunant
left a comment
There was a problem hiding this comment.
Issues commented inline.
Contributor
Author
|
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. |
fw-immunant
reviewed
Jul 13, 2022
fw-immunant
approved these changes
Jul 13, 2022
Contributor
Author
|
@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
Contributor
Author
|
@thedataking, CI is still failing on |
thedataking
reviewed
Aug 9, 2022
…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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This switches all
rust-toolchains torust-toolchain.tomls so we can specify components (and targets, etc. where needed).The benefit of this is that
cargowill 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-toolchainfile in the transpiled crate if nightly features we needed. That was simple with arust-toolchainfile, but withrust-toolchain.toml, it's more complex, as we don't want to override fields in an existingrust-toolchain.tomlthat 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 tocomponentsandtargets, etc.) therust-toolchain.tomlinstead of wholly replacing it.c2rust/c2rust-transpile/src/build_files/mod.rs
Lines 259 to 265 in a91e816