Repository navigation
Conversation
prettyplease exposes syn::File in its API. Allowing both syn majors and both prettyplease minor lines lets Cargo select incompatible pairs, such as syn 2 with prettyplease 0.3, and bindgen then fails to compile. Restore the compatible ranges from before f531ae3 and document why they must stay aligned. Updating only syn in a workspace that also uses syn 2 reproduces the failure even with cargo update --precise. Fixes rust-lang#3448.
bindgen 0.73 declares independent ranges for syn (2 or 3) and prettyplease (0.2 or 0.3). Upgrading from 0.72 with syn 3 elsewhere in the graph, as rustmax has, keeps prettyplease 0.2 locked and fails to compile. Wait for rust-lang/rust-bindgen#3506.
…passes (#3839) The release PR (#3838) fails the feature matrix on `--features fips`, because bindgen 0.73.2 doesn't compile. Its `just update-lockfile` runs `cargo update`, which takes prettyplease from 0.2.37 to 0.3.0. bindgen 0.73 accepts both `prettyplease >=0.2.7, <0.4` and `syn >=2, <4`, and the update leaves it on syn 2.0.119 next to prettyplease 0.3.0, which is built on syn 3, so bindgen's own call into prettyplease no longer type-checks ([rust-lang/rust-bindgen#3448](rust-lang/rust-bindgen#3448), fix open in [rust-lang/rust-bindgen#3506](rust-lang/rust-bindgen#3506)). This pins prettyplease back to 0.2.37 in `update-lockfile`, next to the `sdf_glyph_renderer` pin, and bans newer releases in `deny.toml` with that reason. Main's lockfile doesn't change. On current main, `just update-lockfile` followed by the matrix's `cargo check --all-targets --manifest-path martin/Cargo.toml --no-default-features --features fips` fails with the release PR's error, and with this change it passes. `cargo deny check bans` passes on main's lockfile and on the updated one, and flags prettyplease 0.3.0 with the reason.
Keep weekly Cargo and Bazel updates and monthly GitHub Actions updates grouped by ecosystem. Keep the three-day release age for crates and actions, leave runner selection explicit, and hold pahole until #1821 removes its version from the kernel probes. Dependabot has reported a different Cargo version from the one it wrote to the manifest [1]; its proposed fix is still open [2]. Update #1847 independently hit the bindgen/syn downgrade reported against Dependabot [3]. The fix for that incompatible dependency range belongs in bindgen [4] and is still needed with Renovate. [1] dependabot/dependabot-core#11586 [2] dependabot/dependabot-core#16399 [3] dependabot/dependabot-core#16579 [4] rust-lang/rust-bindgen#3506
Dependabot has reported old Cargo versions as the result of an update [1]; the proposed reporting fix is [2]. Its Bazel updater also misses files that module extensions read from the checkout [3]. Aya's grouped update [4] exposed a separate bindgen regression: Cargo can resolve different syn majors for bindgen and prettyplease [5]. Switching bots does not fix that; bindgen's proposed fix is [6]. Keep one monthly group each for Bazel, Cargo and GitHub Actions. Keep llvm-sys within the Cargo range for each LLVM ABI. Wait three days for Cargo and third-party Actions releases. Track the first-party reusable workflow's main branch by its inline SHA: actions.lock does not cover that workflow [7], and an active branch tip need not reach three days old. Let Renovate update actions.lock when a version changes. [1] dependabot/dependabot-core#11586 [2] dependabot/dependabot-core#16399 [3] dependabot/dependabot-core#16398 [4] aya-rs/aya#1847 [5] dependabot/dependabot-core#16579 [6] rust-lang/rust-bindgen#3506 [7] github/gh-actions-lock#179
|
@emilio could you please TAL? |
|
or perhaps @djc? |
|
I am not a maintainer for this project. |
Dependabot has reported old Cargo versions as the result of an update [1]; the proposed reporting fix is [2]. Its Bazel updater also misses files that module extensions read from the checkout [3]. Aya's grouped update [4] exposed a separate bindgen regression: Cargo can resolve different syn majors for bindgen and prettyplease [5]. Switching bots does not fix that; bindgen's proposed fix is [6]. Keep one monthly group each for Bazel, Cargo and GitHub Actions. Keep llvm-sys within the Cargo range for each LLVM ABI. Wait three days for Cargo and third-party Actions releases. Track the first-party reusable workflow's main branch by its inline SHA: actions.lock does not cover that workflow [7], and an active branch tip need not reach three days old. Let Renovate update actions.lock when a version changes. [1] dependabot/dependabot-core#11586 [2] dependabot/dependabot-core#16399 [3] dependabot/dependabot-core#16398 [4] aya-rs/aya#1847 [5] dependabot/dependabot-core#16579 [6] rust-lang/rust-bindgen#3506 [7] github/gh-actions-lock#179
@tamird It looks like that compilation failure was resolved downstream? |
|
Yes, by manually ensuring that syn and prettyplease resolved to the same version. The intent of f531ae3 was to allow either 2.x or 3.x for syn and prettyplease but there's no way to tell cargo that if syn 2.x is chosen then prettyplease 2.x must be chosen, so cargo is free to mix and match. That's what this PR fixes. It is possible to manually arrange for the correct selection, even without this PR, but it is a nuisance. |
Dependabot has reported old Cargo versions as the result of an update [1]; the proposed reporting fix is [2]. Its Bazel updater also misses files that module extensions read from the checkout [3]. Aya's grouped update [4] exposed a separate bindgen regression: Cargo can resolve different syn majors for bindgen and prettyplease [5]. Switching bots does not fix that; bindgen's proposed fix is [6]. Keep one monthly group each for Bazel, Cargo and GitHub Actions. Keep llvm-sys within the Cargo range for each LLVM ABI. Wait three days for Cargo and third-party Actions releases. Track the first-party reusable workflow's main branch by its inline SHA: actions.lock does not cover that workflow [7], and an active branch tip need not reach three days old. Let Renovate update actions.lock when a version changes. [1] dependabot/dependabot-core#11586 [2] dependabot/dependabot-core#16399 [3] dependabot/dependabot-core#16398 [4] aya-rs/aya#1847 [5] dependabot/dependabot-core#16579 [6] rust-lang/rust-bindgen#3506 [7] github/gh-actions-lock#179
Keep weekly Cargo and Bazel updates and monthly GitHub Actions updates grouped by ecosystem. Keep the three-day release age for crates and actions, leave runner selection explicit, and hold pahole until #1821 removes its version from the kernel probes. Dependabot has reported a different Cargo version from the one it wrote to the manifest [1]; its proposed fix is still open [2]. Update #1847 independently hit the bindgen/syn downgrade reported against Dependabot [3]. The fix for that incompatible dependency range belongs in bindgen [4] and is still needed with Renovate. [1] dependabot/dependabot-core#11586 [2] dependabot/dependabot-core#16399 [3] dependabot/dependabot-core#16579 [4] rust-lang/rust-bindgen#3506
We have the exact same issue in https://github.com/project-llzk/llzk-rs. When running a cargo update, it would often end up choosing incompatible |
Dependabot has reported old Cargo versions as the result of an update [1]; the proposed reporting fix is [2]. Its Bazel updater also misses files that module extensions read from the checkout [3]. Aya's grouped update [4] exposed a separate bindgen regression: Cargo can resolve different syn majors for bindgen and prettyplease [5]. Switching bots does not fix that; bindgen's proposed fix is [6]. Keep one monthly group each for Bazel, Cargo and GitHub Actions. Keep llvm-sys within the Cargo range for each LLVM ABI. Wait three days for Cargo and third-party Actions releases. Track the first-party reusable workflow's main branch by its inline SHA: actions.lock does not cover that workflow [7], and an active branch tip need not reach three days old. Let Renovate update actions.lock when a version changes. [1] dependabot/dependabot-core#11586 [2] dependabot/dependabot-core#16399 [3] dependabot/dependabot-core#16398 [4] aya-rs/aya#1847 [5] dependabot/dependabot-core#16579 [6] rust-lang/rust-bindgen#3506 [7] github/gh-actions-lock#179
Dependabot has reported old Cargo versions as the result of an update [1]; the proposed reporting fix is [2]. Its Bazel updater also misses files that module extensions read from the checkout [3]. Aya's grouped update [4] exposed a separate bindgen regression: Cargo can resolve different syn majors for bindgen and prettyplease [5]. Switching bots does not fix that; bindgen's proposed fix is [6]. Keep one monthly group each for Bazel, Cargo and GitHub Actions. Keep llvm-sys within the Cargo range for each LLVM ABI. Wait three days for Cargo and third-party Actions releases. Track the first-party reusable workflow's main branch by its inline SHA: actions.lock does not cover that workflow [7], and an active branch tip need not reach three days old. Let Renovate update actions.lock when a version changes. [1] dependabot/dependabot-core#11586 [2] dependabot/dependabot-core#16399 [3] dependabot/dependabot-core#16398 [4] aya-rs/aya#1847 [5] dependabot/dependabot-core#16579 [6] rust-lang/rust-bindgen#3506 [7] github/gh-actions-lock#179
) ## Summary ```diff deny.toml bans - prettyplease:>0.2.37 # fails dependency-review on every PR since #3879 just update-lockfile cargo update # keeps bindgen on syn 3.0.9 + prettyplease 0.3.0 cargo update --precise 1.0.2 sdf_glyph_renderer - cargo update --precise 0.2.37 prettyplease # takes bindgen back to syn 2.0.119 ``` bindgen 0.73.2 compiles only on a matching pair, syn 2 + prettyplease 0.2 or syn 3 + 0.3 ([rust-lang/rust-bindgen#3448](rust-lang/rust-bindgen#3448), fix in [rust-lang/rust-bindgen#3506](rust-lang/rust-bindgen#3506)). Main has had the **syn 3 pair** since #3879, and its fips check builds it ([job](https://github.com/maplibre/martin/actions/runs/41744159445/job/126297140674)). ## Merge Danger **Door:** two-way **Blast Radius:** dependency-review and the release PR's lockfile
Hold bindgen at 0.72 and document why in botdocs/tasks.md: bindgen 0.73 can pair prettyplease 0.2 with syn 3 from an existing lockfile and fail to compile (rust-lang/rust-bindgen#3506).
Fixes #3448. This also explains the compilation failure in aya-rs/aya#1764.
A small downstream crate reproduces the problem with these dependencies:
Generate its lockfile, change the direct
synrequirement to"3", then runcargo update -p syn:3.0.5 --precise 3.0.6. Cargo leaves prettyplease on syn 3 and moves bindgen to syn 2.cargo checkfails with E0277 atprettyplease::unparse(&syn::parse_quote!(#tokens)). Plaincargo updatetargeting the same package produces the same failure.This restores the compatible dependency ranges from before f531ae3. Other dependencies can continue using syn 2 alongside bindgen.
Prepared with Codex.