Skip to content

Conversation

@kkysen
Copy link
Contributor

@kkysen kkysen commented Oct 19, 2025

These have been missed for a long time, so we've been using 6-year-old versions this whole time.

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
)
```
@kkysen kkysen force-pushed the kkysen/update-deps-in-generated-Cargo.toml branch from ee9bf45 to 7f72a0f Compare October 20, 2025 21:27
@kkysen kkysen changed the base branch from master to kkysen/update-generated-rust-version October 20, 2025 21:27
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
)
```
@kkysen kkysen force-pushed the kkysen/update-generated-rust-version branch from 34a4213 to ad39c04 Compare October 23, 2025 05:03
@kkysen kkysen force-pushed the kkysen/update-deps-in-generated-Cargo.toml branch from 7f72a0f to f944d7e Compare October 23, 2025 05:29
@kkysen kkysen changed the base branch from kkysen/update-generated-rust-version to kkysen/ci-fix-test_translator-syn-v2 October 23, 2025 05:30
@kkysen kkysen force-pushed the kkysen/update-deps-in-generated-Cargo.toml branch from 15ea0e9 to 4e329dd Compare October 23, 2025 05:35
@kkysen kkysen force-pushed the kkysen/update-deps-in-generated-Cargo.toml branch from 4e329dd to d5810d2 Compare October 23, 2025 19:10
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
)
```
Base automatically changed from kkysen/ci-fix-test_translator-syn-v2 to master October 23, 2025 19:35
@kkysen kkysen merged commit 461bee5 into master Oct 23, 2025
5 checks passed
@kkysen kkysen deleted the kkysen/update-deps-in-generated-Cargo.toml branch October 23, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants