-
Notifications
You must be signed in to change notification settings - Fork 291
ci: set C2RUST_DIR for c2rust-testsuite so that current versions of c2rust crates are used
#1420
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
Merged
Conversation
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
kkysen
added a commit
that referenced
this pull request
Oct 20, 2025
…t 1.65 Our workspace `Cargo.toml` uses workspace inheritance, which was stabilized in Rust 1.64, so is fine with our pinned nightly of Rust 1.65. But `c2rust-refactor` was using `cargo v0.62` (corresponding to Rust 1.62), so when `c2rust-refactor` was run on a `Cargo.toml` that referenced `c2rust-bitfields` with a relative path to our repo, it broke on this (which #1419 and #1420 fix/enable). Thus, we need to update to at least `cargo v0.64`, and preferably `v0.65`. `cargo v0.65` depends on `toml_edit v0.14.3`, which depends on `kstring v2.0.0`. By default, `kstring v2.0.1` is selected (since Rust 1.65 doesn't support the MSRV-aware resolver), but it has an MSRV of Rust 1.73, too new. Luckily, though, `kstring v2.0.0` has an MSRV of Rust 1.59, so we pin it.
kkysen
added a commit
that referenced
this pull request
Oct 20, 2025
…t 1.65 Our workspace `Cargo.toml` uses workspace inheritance, which was stabilized in Rust 1.64, so is fine with our pinned nightly of Rust 1.65. But `c2rust-refactor` was using `cargo v0.62` (corresponding to Rust 1.62), so when `c2rust-refactor` was run on a `Cargo.toml` that referenced `c2rust-bitfields` with a relative path to our repo, it broke on this (which #1419 and #1420 fix/enable). Thus, we need to update to at least `cargo v0.64`, and preferably `v0.65`. `cargo v0.65` depends on `toml_edit v0.14.3`, which depends on `kstring v2.0.0`. By default, `kstring v2.0.1` is selected (since Rust 1.65 doesn't support the MSRV-aware resolver), but it has an MSRV of Rust 1.73, too new. Luckily, though, `kstring v2.0.0` has an MSRV of Rust 1.59, so we pin it. `cargo-util` is then also updated to match `cargo v0.65`'s dependency.
kkysen
added a commit
that referenced
this pull request
Oct 20, 2025
…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 )
kkysen
added a commit
that referenced
this pull request
Oct 20, 2025
…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 )
kkysen
added a commit
that referenced
this pull request
Oct 20, 2025
…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 ) ```
8380b74 to
0da8fb7
Compare
a4a4272 to
3bd9afb
Compare
ahomescu
approved these changes
Oct 21, 2025
kkysen
added a commit
that referenced
this pull request
Oct 23, 2025
…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 ) ```
0da8fb7 to
844fa4e
Compare
3bd9afb to
cc3107d
Compare
kkysen
added a commit
that referenced
this pull request
Oct 23, 2025
…t 1.65 Our workspace `Cargo.toml` uses workspace inheritance, which was stabilized in Rust 1.64, so is fine with our pinned nightly of Rust 1.65. But `c2rust-refactor` was using `cargo v0.62` (corresponding to Rust 1.62), so when `c2rust-refactor` was run on a `Cargo.toml` that referenced `c2rust-bitfields` with a relative path to our repo, it broke on this (which #1419 and #1420 fix/enable). Thus, we need to update to at least `cargo v0.64`, and preferably `v0.65`. `cargo v0.65` depends on `toml_edit v0.14.3`, which depends on `kstring v2.0.0`. By default, `kstring v2.0.1` is selected (since Rust 1.65 doesn't support the MSRV-aware resolver), but it has an MSRV of Rust 1.73, too new. Luckily, though, `kstring v2.0.0` has an MSRV of Rust 1.59, so we pin it. `cargo-util` is then also updated to match `cargo v0.65`'s dependency.
844fa4e to
a33d486
Compare
cc3107d to
f35d9d0
Compare
kkysen
added a commit
that referenced
this pull request
Oct 23, 2025
…t 1.65 Our workspace `Cargo.toml` uses workspace inheritance, which was stabilized in Rust 1.64, so is fine with our pinned nightly of Rust 1.65. But `c2rust-refactor` was using `cargo v0.62` (corresponding to Rust 1.62), so when `c2rust-refactor` was run on a `Cargo.toml` that referenced `c2rust-bitfields` with a relative path to our repo, it broke on this (which #1419 and #1420 fix/enable). Thus, we need to update to at least `cargo v0.64`, and preferably `v0.65`. `cargo v0.65` depends on `toml_edit v0.14.3`, which depends on `kstring v2.0.0`. By default, `kstring v2.0.1` is selected (since Rust 1.65 doesn't support the MSRV-aware resolver), but it has an MSRV of Rust 1.73, too new. Luckily, though, `kstring v2.0.0` has an MSRV of Rust 1.59, so we pin it. `cargo-util` is then also updated to match `cargo v0.65`'s dependency.
a33d486 to
424a034
Compare
f35d9d0 to
cb4ec12
Compare
…of c2rust crates are used
kkysen
added a commit
that referenced
this pull request
Oct 23, 2025
…t 1.65 Our workspace `Cargo.toml` uses workspace inheritance, which was stabilized in Rust 1.64, so is fine with our pinned nightly of Rust 1.65. But `c2rust-refactor` was using `cargo v0.62` (corresponding to Rust 1.62), so when `c2rust-refactor` was run on a `Cargo.toml` that referenced `c2rust-bitfields` with a relative path to our repo, it broke on this (which #1419 and #1420 fix/enable). Thus, we need to update to at least `cargo v0.64`, and preferably `v0.65`. `cargo v0.65` depends on `toml_edit v0.14.3`, which depends on `kstring v2.0.0`. By default, `kstring v2.0.1` is selected (since Rust 1.65 doesn't support the MSRV-aware resolver), but it has an MSRV of Rust 1.73, too new. Luckily, though, `kstring v2.0.0` has an MSRV of Rust 1.59, so we pin it. `cargo-util` is then also updated to match `cargo v0.65`'s dependency.
424a034 to
4ed2d74
Compare
cb4ec12 to
02442bb
Compare
kkysen
added a commit
that referenced
this pull request
Oct 23, 2025
…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 ) ```
kkysen
added a commit
that referenced
this pull request
Oct 23, 2025
…t 1.65 (#1421) Our workspace `Cargo.toml` uses workspace inheritance, which was stabilized in Rust 1.64, so is fine with our pinned nightly of Rust 1.65. But `c2rust-refactor` was using `cargo v0.62` (corresponding to Rust 1.62), so when `c2rust-refactor` was run on a `Cargo.toml` that referenced `c2rust-bitfields` with a relative path to our repo, it broke on this (which #1419 and #1420 fix/enable). Thus, we need to update to at least `cargo v0.64`, and preferably `v0.65`. `cargo v0.65` depends on `toml_edit v0.14.3`, which depends on `kstring v2.0.0`. By default, `kstring v2.0.1` is selected (since Rust 1.65 doesn't support the MSRV-aware resolver), but it has an MSRV of Rust 1.73, too new. Luckily, though, `kstring v2.0.0` has an MSRV of Rust 1.59, so we pin it.
Base automatically changed from
kkysen/fix-stripped-whitespace-in-generated-Cargo.toml
to
master
October 23, 2025 19:37
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.
The
transpile.gen.shs generated byc2rust-testsuiteuseC2RUST_DIRto set dependencies in generatedCargo.tomls to point to the currentc2rustdirectory, allowing it to test with the current version ofc2rust-bitfieldsandc2rust-asm-casts.This needs #1419 fixed first, and it should unblock #1408, which depends on the
c2rust-bitfields-derivefix in #1411.