-
Notifications
You must be signed in to change notification settings - Fork 288
Split crates requiring nightly Rust into separate unstable workspace
#1227
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
base: master
Are you sure you want to change the base?
Conversation
|
Marking as WIP, because it'll need some CI debugging to make sure tests don't fail. |
|
Also I merged #1225 so you can rebase now. |
|
Currently attempting a full implementation of #1220. Still WIP; will work on ensuring CI passes. |
unstable workspace
|
Side note: |
bb14e51 to
444ca79
Compare
|
@kkysen EDIT: Seems to be working again. |
|
@kkysen I just realized that the Docker images probably don't get rebuilt as a result of this pipeline; I updated the scripts that build Docker images, and then the failure is happening because the CI runs using the old Docker images. I think this may be easiest to fix by going ahead and switching away from Azure pipelines. I'll work towards that. |
It's used in a test here: c2rust/c2rust-analyze/tests/analyze.rs Line 74 in 4b7691e
As long as you keep the relative paths the same, it should still work fine. We in general gitignored *.bc files but added this one manually for this one test.
|
Oh yes, that's always been one of the very annoying pain points with Azure pipelines. We have to update the docker images separately, and so we can't test multiple in CI at the same time either. One of the many reasons I've always wanted to move away from Azure pipelines. I agree it's probably easier to just move to GitHub Actions in one go and things will work better there. Thanks again for helping with all of this! |
|
(Apologies that this change stalled out. Some other things came up. I'll get back to it eventually, but someone else who wants to work on it should not hesitate to pick it up and run with it.) |
a00fa22 to
768a099
Compare
b647886 to
c57c608
Compare
d890b5c to
d4e510b
Compare
now that the transpiler builds on stable, tests need to specify their own rust toolchain as generated code still requires nightly
Fixes: immunant#1220 Co-authored-by: Khyber Sen <kkysen@gmail.com>
At this point, we care more about the stable (`c2rust-transpiler`) workspace, and its tests are faster as well, so run them separately and first.
…for cargo's sparse registry The old git-based registry fetching is extremely slow in CI, and due to stable crates now building on stable but testing their output on nightly, is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this.
…for `syn v2.0.107` and `cargo`'s sparse registry `c2rust-bitfields-derive` depends on `syn v2.0`. Without a `Cargo.lock`, like in transpiled projects (as opposed to `c2rust` itself), this will resolve to `syn v2.0.107`, which requires Rust 1.68, but the generated `rust-toolchain.toml` uses Rust 1.65 (the same as our own nightly). This is currently breaking CI for the `c2rust-instrument` tests, and will also break CI for `c2rust-testsuite` once #1418 lands (a bug fix). Furthermore, the old git-based registry fetching is extremely slow in CI, so when #1227 lands and switches to stable, we also want Rust 1.70 for `cargo`'s sparse registry. Due to stable crates now building on stable but testing their output on nightly, it is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this. The combination of this, #1418, #1419, #1420, and #1421 has been tested to work on `libxml2`: ```sh cargo build --release (cd ../c2rust-testsuite/tests/libxml2/repo/ && $OLDPWD/target/release/c2rust-refactor --cargo --rewrite-mode inplace --lib reorganize_definitions )
…for `syn v2.0.107` and `cargo`'s sparse registry `c2rust-bitfields-derive` depends on `syn v2.0`. Without a `Cargo.lock`, like in transpiled projects (as opposed to `c2rust` itself), this will resolve to `syn v2.0.107`, which requires Rust 1.68, but the generated `rust-toolchain.toml` uses Rust 1.65 (the same as our own nightly). This is currently breaking CI for the `c2rust-instrument` tests, and will also break CI for `c2rust-testsuite` once #1418 lands (a bug fix). Furthermore, the old git-based registry fetching is extremely slow in CI, so when #1227 lands and switches to stable, we also want Rust 1.70 for `cargo`'s sparse registry. Due to stable crates now building on stable but testing their output on nightly, it is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this. The combination of this, #1418, #1419, #1420, and #1421 has been tested to work on `libxml2`: ```sh cargo build --release (cd ../c2rust-testsuite/tests/libxml2/repo/ && $OLDPWD/target/release/c2rust-refactor --cargo --rewrite-mode inplace --lib reorganize_definitions )
…for `syn v2.0.107` and `cargo`'s sparse registry `c2rust-bitfields-derive` depends on `syn v2.0`. Without a `Cargo.lock`, like in transpiled projects (as opposed to `c2rust` itself), this will resolve to `syn v2.0.107`, which requires Rust 1.68, but the generated `rust-toolchain.toml` uses Rust 1.65 (the same as our own nightly). This is currently breaking CI for the `c2rust-instrument` tests, and will also break CI for `c2rust-testsuite` once #1418 lands (a bug fix). Furthermore, the old git-based registry fetching is extremely slow in CI, so when #1227 lands and switches to stable, we also want Rust 1.70 for `cargo`'s sparse registry. Due to stable crates now building on stable but testing their output on nightly, it is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this. The combination of this, #1418, #1419, #1420, and #1421 has been tested to work on `libxml2`: ```sh cargo build --release (cd ../c2rust-testsuite/tests/libxml2/repo/ && $OLDPWD/target/release/c2rust-refactor --cargo --rewrite-mode inplace --lib reorganize_definitions ) ```
…for `syn v2.0.107` and `cargo`'s sparse registry `c2rust-bitfields-derive` depends on `syn v2.0`. Without a `Cargo.lock`, like in transpiled projects (as opposed to `c2rust` itself), this will resolve to `syn v2.0.107`, which requires Rust 1.68, but the generated `rust-toolchain.toml` uses Rust 1.65 (the same as our own nightly). This is currently breaking CI for the `c2rust-instrument` tests, and will also break CI for `c2rust-testsuite` once #1418 lands (a bug fix). Furthermore, the old git-based registry fetching is extremely slow in CI, so when #1227 lands and switches to stable, we also want Rust 1.70 for `cargo`'s sparse registry. Due to stable crates now building on stable but testing their output on nightly, it is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this. The combination of this, #1418, #1419, #1420, and #1421 has been tested to work on `libxml2`: ```sh cargo build --release (cd ../c2rust-testsuite/tests/libxml2/repo/ && $OLDPWD/target/release/c2rust-refactor --cargo --rewrite-mode inplace --lib reorganize_definitions ) ```
…for `syn v2.0.107` and `cargo`'s sparse registry (#1422) `c2rust-bitfields-derive` depends on `syn v2.0`. Without a `Cargo.lock`, like in transpiled projects (as opposed to `c2rust` itself), this will resolve to `syn v2.0.107`, which requires Rust 1.68, but the generated `rust-toolchain.toml` uses Rust 1.65 (the same as our own nightly). This is currently breaking CI for the `c2rust-instrument` tests, and will also break CI for `c2rust-testsuite` once #1418 lands (a bug fix). Furthermore, the old git-based registry fetching is extremely slow in CI, so when #1227 lands and switches to stable, we also want Rust 1.70 for `cargo`'s sparse registry. Due to stable crates now building on stable but testing their output on nightly, it is very difficult to correctly cache. Updating the nightly of their output to the earliest to have the sparse registry should fix this. The combination of this, #1418, #1419, #1420, and #1421 has been tested to work on `libxml2`: ```sh cargo build --release (cd ../c2rust-testsuite/tests/libxml2/repo/ && $OLDPWD/target/release/c2rust-refactor --cargo --rewrite-mode inplace --lib reorganize_definitions ) ```
No description provided.