Skip to content

Fix lower bound of cc crate#182

Merged
GuillaumeLagrange merged 1 commit into
CodSpeedHQ:mainfrom
konstin:konsti/fix-cc-lower-bound
Jun 19, 2026
Merged

Fix lower bound of cc crate#182
GuillaumeLagrange merged 1 commit into
CodSpeedHQ:mainfrom
konstin:konsti/fix-cc-lower-bound

Conversation

@konstin

@konstin konstin commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Currently, the codspeed crate is declaring a dependency on cc 1.0, while using newer features. This is causing errors in minimal version checks in downstream crates.

This PR dumps the cc minimal version and adds a minimal-versions CI check to enforce correct lower bounds.

konstin added a commit to pubgrub-rs/pubgrub that referenced this pull request Jun 7, 2026
Old versions sometimes stop working on recent nightly, which broke the check on main. Using stable rust avoids this problem in the future.

Also bump codspeed for the associated cc bump, to work around CodSpeedHQ/codspeed-rust#182.
konstin added a commit to pubgrub-rs/pubgrub that referenced this pull request Jun 7, 2026
Old versions sometimes stop working on recent nightly, which broke the check on main. Using stable rust avoids this problem in the future.

Also bump codspeed for the associated cc bump, to work around CodSpeedHQ/codspeed-rust#182.
@greptile-apps

greptile-apps Bot commented Jun 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes an incorrect lower bound on the cc build dependency in crates/codspeed/Cargo.toml, tightening it from the overly-broad "1.0" to "1.2.40" which reflects the actual minimum required by the build.rs script (which calls APIs such as .cargo_warnings() and .try_compile() not available in older releases). A companion CI job using cargo +nightly update -Zminimal-versions is added to prevent lower-bound regressions going forward.

  • crates/codspeed/Cargo.toml: cc build-dependency lower bound tightened from "1.0""1.2.40".
  • .github/workflows/ci.yml: New minimal-versions job resolves all codspeed dependencies to their declared minimums and runs cargo check, wired into the existing check gate.
  • Cargo.lock: Routine lock-file update — cc bumped to 1.2.63, find-msvc-tools to 0.1.9, shlex to 2.0.1.

Confidence Score: 5/5

Safe to merge — the change is a targeted dependency lower-bound fix with a CI guard that will catch any future regressions.

The only code change is a single version constraint bump in one Cargo.toml, paired with a CI job that directly validates the correctness of that bound using Cargo's own -Zminimal-versions resolver. The lock-file bump is a routine update with no logic changes.

No files require special attention.

Important Files Changed

Filename Overview
crates/codspeed/Cargo.toml Bumps the cc build-dependency lower bound from the overly-broad "1.0" to the precise minimum "1.2.40" that the build script actually requires.
.github/workflows/ci.yml Adds a new minimal-versions CI job that uses nightly -Zminimal-versions to resolve dependencies to their declared lower bounds and then cargo-checks the codspeed crate, enforcing correct lower bounds going forward.
Cargo.lock Updates cc (1.2.38→1.2.63), find-msvc-tools (0.1.2→0.1.9), and shlex (1.3.0→2.0.1) as a routine lock-file refresh.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant GH as GitHub Actions
    participant Nightly as cargo (nightly)
    participant Stable as cargo (stable)
    participant CC as cc crate (>=1.2.40)

    GH->>Nightly: cargo +nightly update -Zminimal-versions -p codspeed --recursive
    Nightly-->>GH: "Cargo.lock resolved to minimum declared versions (cc = 1.2.40)"
    GH->>Stable: "cargo check -p codspeed --all-features --config codspeed=true"
    Stable->>CC: compile build.rs using cc 1.2.40
    CC-->>Stable: Build::cargo_warnings(), try_compile(), try_get_compiler() all available
    Stable-->>GH: check passes, lower bounds validated
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant GH as GitHub Actions
    participant Nightly as cargo (nightly)
    participant Stable as cargo (stable)
    participant CC as cc crate (>=1.2.40)

    GH->>Nightly: cargo +nightly update -Zminimal-versions -p codspeed --recursive
    Nightly-->>GH: "Cargo.lock resolved to minimum declared versions (cc = 1.2.40)"
    GH->>Stable: "cargo check -p codspeed --all-features --config codspeed=true"
    Stable->>CC: compile build.rs using cc 1.2.40
    CC-->>Stable: Build::cargo_warnings(), try_compile(), try_get_compiler() all available
    Stable-->>GH: check passes, lower bounds validated
Loading

Reviews (3): Last reviewed commit: "Fix lower bound of cc crate" | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Jun 7, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 7.42%

⚡ 18 improved benchmarks
❌ 6 (👁 2) regressed benchmarks
✅ 567 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime hamiltonian_cycle[7] 1 µs 1.8 µs -43.61%
WallTime large_drop 208.9 µs 242.9 µs -13.99%
WallTime add_two_integers[(65535, -65535)] 75 ns 83 ns -9.64%
WallTime init_array[42] 47 ns 51 ns -7.84%
WallTime bench_array1[42] 80 ns 48 ns +66.67%
WallTime hamiltonian_cycle[5] 1,475 ns 911 ns +61.91%
WallTime iter_batched_ref_large_input 6 ns 4 ns +50%
WallTime iter_batched_per_iteration 57 ns 46 ns +23.91%
WallTime bench_array2[42] 54 ns 48 ns +12.5%
WallTime graph_coloring[5] 1.2 µs 1 µs +11.51%
WallTime bench_array2[10] 10 ns 9 ns +11.11%
WallTime fib_in_thread[32] 17.9 ms 16.3 ms +9.81%
WallTime fib_in_thread_bench_local[32] 17.9 ms 16.3 ms +9.79%
WallTime fib_in_thread_bench[31] 11.2 ms 10.2 ms +9.77%
WallTime fib_in_thread_bench_local[31] 11.2 ms 10.2 ms +9.73%
WallTime fib_in_thread[31] 11.2 ms 10.2 ms +9.72%
WallTime fib_in_thread_bench[32] 17.9 ms 16.3 ms +9.71%
WallTime fib_in_thread_bench[30] 7.1 ms 6.5 ms +9.42%
WallTime fib_in_thread_bench_local[30] 7.1 ms 6.5 ms +9.39%
WallTime fib_in_thread[30] 7.1 ms 6.5 ms +9.28%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing konstin:konsti/fix-cc-lower-bound (d662f12) with main (ec46807)

Open in CodSpeed

konstin added a commit to astral-sh/pubgrub that referenced this pull request Jun 7, 2026
Old versions sometimes stop working on recent nightly, which broke the check on main. Using stable rust avoids this problem in the future.

Also bump codspeed for the associated cc bump, to work around CodSpeedHQ/codspeed-rust#182.
@GuillaumeLagrange

Copy link
Copy Markdown
Contributor

Thanks! Good catch

Currently, the codspeed crate is declaring a dependency on cc 1.0, while using newer features. This is causing errors in minimal version checks in downstream crates.

This PR dumps the cc minimal version and adds a minimal-versions CI check to enforce correct lower bounds.

Signed-off-by: Guillaume Lagrange <guillaume@glagrange.eu>
@GuillaumeLagrange GuillaumeLagrange force-pushed the konsti/fix-cc-lower-bound branch from 36b90f9 to d662f12 Compare June 19, 2026 09:37
@GuillaumeLagrange GuillaumeLagrange merged commit 73170f9 into CodSpeedHQ:main Jun 19, 2026
43 of 44 checks passed
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