Skip to content

chore(bindgen): bump syn to v3#3401

Open
AudaciousAxiom wants to merge 2 commits into
rust-lang:mainfrom
AudaciousAxiom:chore/syn-v3
Open

chore(bindgen): bump syn to v3#3401
AudaciousAxiom wants to merge 2 commits into
rust-lang:mainfrom
AudaciousAxiom:chore/syn-v3

Conversation

@AudaciousAxiom

Copy link
Copy Markdown

Following the recent release of syn v3, this bumps the dependency with the aim of reducing dependency duplication in dependents.

Because syn v3 advertises an MSRV of 1.71, this first bumps the MSRV of bindgen from 1.70 to 1.71 (which I think is acceptable).

syn v3 of course contains breaking changes: I've been through the changelog but didn't find anything relevant (but there are quite a few of them so I could have missed some). I've run cargo test but didn't do any other kind of testing.

Comment thread Cargo.lock
"proc-macro2",
"quote",
"syn",
"syn 2.0.104",

@AudaciousAxiom AudaciousAxiom Jul 27, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It would be possible to remove the dependency on syn v2 (which is only used by bindgen when the "private" __cli Cargo feature is enabled, as done by bindgen-cli), but the version of clap that depends on syn v3 has an MSRV of 1.85. I think it's better to keep the compatibility of bindgen for the build-script use case, even if that means compiling two versions of syn for the CLI.

Alternatively, it may be possible to exclude the "private" __cli Cargo feature from the MSRV guarantee, and give bindgen-cli an MSRV of 1.85, different from that of the rest of the workspace, but that seems unnecessarily complicated (even though I see that the README does allow for that, so your call).

View changes since the review

@AudaciousAxiom
AudaciousAxiom marked this pull request as ready for review July 27, 2026 07:09
@AudaciousAxiom

Copy link
Copy Markdown
Author

r? @emilio

Comment thread Cargo.lock
]

[[package]]
name = "clap_derive"

@emilio emilio Jul 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we update this?

View changes since the review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Only if we bump the MSRV of bindgen-cli to 1.85, which I can do if you're ok with decoupling its MSRV from bindgen's.

@oscargus

Copy link
Copy Markdown

Maybe you can increase the range for itertools to include 0.15 as well? (I was about to make a PR for that, but it can just as well go here.)

Works on my Windows machine (as in exactly the same failing tests as with the current Cargo.lock...)

@AudaciousAxiom
AudaciousAxiom requested a review from emilio July 27, 2026 16:59
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.

3 participants