Skip to content

pdg: check in Cargo.locks for analysis tests#1429

Merged
kkysen merged 1 commit intomasterfrom
kkysen/ci-fix-pdg-analysis-tests-syn-v2-Cargo-lock
Oct 23, 2025
Merged

pdg: check in Cargo.locks for analysis tests#1429
kkysen merged 1 commit intomasterfrom
kkysen/ci-fix-pdg-analysis-tests-syn-v2-Cargo-lock

Conversation

@kkysen
Copy link
Contributor

@kkysen kkysen commented Oct 22, 2025

We had a blanket rule to ignore all but the top-level Cargo.lock. I think this was intended for tests/, but tests/.gitignore already does this, too. These Cargo.locks are needed, or else our pinned nightly (Rust 1.65) cargo will select syn v2.0, which can't be built on Rust 1.65. This is needed by c2rust-instrument, so upgrading the generated nightly here isn't feasible. All of c2rust-instrument would have to be upgraded, which is more involved.

Furthermore, having the Cargo.lock should avoid cargo having to fetch the whole registry every time, which might help speed up CI.

There's another similar syn v2.0 error in test_translator.py. I'll fix that separately, but cargo test and the pdg tests should be good now.

We had a blanket rule to ignore all but the top-level `Cargo.lock`.
I think this was intended for `tests/`, but `tests/.gitignore` already does this, too.
These `Cargo.lock`s are needed, or else our pinned nightly (Rust 1.65) `cargo`
will select `syn v2.0`, which can't be built on Rust 1.65.
This is needed by `c2rust-instrument`, so upgrading the generated nightly here isn't feasible.
All of `c2rust-instrument` would have to be upgraded, which is more involved.

Furthermore, having the `Cargo.lock` should avoid `cargo` having to fetch the whole registry every time,
which might help speed up CI.
@kkysen kkysen requested a review from fw-immunant October 22, 2025 22:31
Copy link
Contributor

@fw-immunant fw-immunant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes the cargo test phase of CI and seems reasonable. Thanks for digging through all our complex versioning/dependency setup, it really seems like a rat's nest.

@kkysen kkysen merged commit ab53cd2 into master Oct 23, 2025
2 of 5 checks passed
@kkysen kkysen deleted the kkysen/ci-fix-pdg-analysis-tests-syn-v2-Cargo-lock branch October 23, 2025 05:01
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