Skip to content

Update colored dep#142

Merged
GuillaumeLagrange merged 2 commits into
CodSpeedHQ:mainfrom
rukai:update_colored
Jun 19, 2026
Merged

Update colored dep#142
GuillaumeLagrange merged 2 commits into
CodSpeedHQ:mainfrom
rukai:update_colored

Conversation

@rukai

@rukai rukai commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Mostly I just want to remove lazy_static from my dep tree, and colored 3.0.0 has removed its dependency on lazy_static.

@GuillaumeLagrange GuillaumeLagrange left a comment

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.

lgtm, thanks!

@codspeed-hq

codspeed-hq Bot commented Nov 4, 2025

Copy link
Copy Markdown

Merging this PR will improve performance by 5.57%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 10 improved benchmarks
❌ 16 (👁 16) regressed benchmarks
✅ 565 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime recursive_memoized[BTreeMap<u64, u64>, 0] 131 ns 14 ns ×9.4
WallTime hamiltonian_cycle[6] 1,499 ns 917 ns +63.47%
WallTime generate_combinations[5] 1.5 µs 1.1 µs +33.71%
WallTime bench_array2[10] 11 ns 9 ns +22.22%
WallTime find_highest_set_bit[255] 6 ns 5 ns +20%
WallTime bench_array1[42] 55 ns 47 ns +17.02%
WallTime sum_fold 355 ns 308 ns +15.26%
Simulation recursive_memoized[BTreeMap<u64, u64>, 0] 488.6 ns 430.3 ns +13.56%
WallTime bench_array2[42] 52 ns 47 ns +10.64%
WallTime hamiltonian_cycle[5] 944 ns 893 ns +5.71%
👁 WallTime system_time 39 ns 53 ns -26.42%
👁 WallTime find_highest_set_bit[42] 5 ns 7 ns -28.57%
👁 WallTime find_highest_set_bit[0] 5 ns 6 ns -16.67%
👁 WallTime permutations[6] 68.4 µs 70.8 µs -3.31%
👁 WallTime iter_batched_per_iteration 47 ns 56 ns -16.07%
👁 WallTime iter_batched_ref_large_input 4 ns 5 ns -20%
👁 WallTime iter_batched_large_input 7 ns 8 ns -12.5%
👁 WallTime from_elem_decimal[1024] 81 ns 85 ns -4.71%
👁 WallTime fib_10 386 ns 455 ns -15.16%
👁 WallTime init_array[42] 48 ns 65 ns -26.15%
... ... ... ... ... ...

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

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing rukai:update_colored (b30ce7d) with main (73170f9)

Open in CodSpeed

@GuillaumeLagrange

Copy link
Copy Markdown
Contributor

@rukai tests are failing but no action on your part is required, we have a msrv bump to decide on, and the other one is CI flakiness on this repo that we need to fix.
Thanks for your PR, we'll get this merged or ping you if we require anything

@GuillaumeLagrange

GuillaumeLagrange commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Hello!

As merging this would require us to raise the rust msrv of the core and the criterion compatibilty crate, we've decided not to merge this for now if the benefit is only getting rid of lazy static.

Next codspeed-rust major is probably when we'll bump msrv to 1.80 since criterion did so upstream and divan already has an 1.80 msrv. We'll keep this open until then unless bumping is required to fix a security issue or if there's a more compelling argument than just getting rid of lazy static.

@GuillaumeLagrange GuillaumeLagrange removed their request for review November 5, 2025 09:30
@rukai

rukai commented Nov 5, 2025

Copy link
Copy Markdown
Contributor Author

Oh, oops I didn't realize colored had bumped it's msrv, totally understandable. Feel free to keep the pr open until you bump your msrv, or feel free to close it for now and just update your deps together once you do bump msrv.

@xtqqczze

xtqqczze commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

colored 2.2.0 depends on windows-sys 0.59.0. Because the latest windows-sys version is 0.61.2, this may lead to multiple versions of windows-sys appearing in the dependency tree. So it would be nice to have this merged.

Edit: I’ve reached out to colored-rs to see if they can backport the windows-sys update to v2: colored-rs/colored#206

@zanieb

zanieb commented Jun 8, 2026

Copy link
Copy Markdown

Similarly, this is adding a separate windows-sys version to our dependency tree in uv which is pretty heavy.

It seems reasonable to bump the MSRV to 1.80?

@greptile-apps

greptile-apps Bot commented Jun 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR upgrades colored from 2.x to 3.x across the workspace to eliminate the lazy_static transitive dependency, and bumps the declared MSRV from 1.74 to 1.80 in all crates to match colored 3's own minimum requirement.

  • colored 3.1.1 replaces 2.1.0 in Cargo.lock, dropping lazy_static and updating windows-sys from 0.48 to 0.52.
  • All four Cargo.toml files have their rust-version field updated from "1.74" to "1.80".
  • build.rs gains a small refactor (map_errinspect_err) and a partial typo fix ("exist status""exit status"), though one instance of the typo and a now-stale MSRV comment remain.

Confidence Score: 5/5

Safe to merge — the change is a straightforward version bump with no API breakage; the public Colorize trait is unchanged in colored 3.x and all call sites compile cleanly.

The colored 3.x upgrade removes lazy_static without any breaking API changes to the Colorize trait used in the codebase. The MSRV bump to 1.80 is consistent across all crates and matches colored 3's requirement. The build.rs refactor is correct: inspect_err (stable since 1.76) fits within the new 1.80 floor. Only minor cosmetic issues were found.

crates/cargo-codspeed/src/build.rs has a remaining typo and a stale MSRV comment that were missed during the partial cleanup.

Important Files Changed

Filename Overview
Cargo.lock Updates colored from 2.1.0 to 3.1.1, dropping lazy_static and updating windows-sys from 0.48 to 0.52 as expected.
crates/codspeed/Cargo.toml Bumps colored requirement from "2.0.0" to "3.0.0" and MSRV from 1.74 to 1.80, consistent with colored 3.x's own MSRV.
crates/criterion_compat/Cargo.toml Bumps colored from "2.1.0" to "3.0.0" and MSRV from 1.74 to 1.80.
crates/cargo-codspeed/src/build.rs Refactors map_err to inspect_err (valid with MSRV 1.80) and fixes the "exist status" typo in one place, but the same typo persists on line 168; also has a now-stale MSRV 1.74 comment on line 241.
crates/cargo-codspeed/Cargo.toml MSRV bumped from 1.74 to 1.80 to align with workspace-wide change; no other dependency changes.
crates/bencher_compat/Cargo.toml MSRV bumped from 1.74 to 1.80 to stay consistent with the rest of the workspace.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[cargo-codspeed] -->|depends on| B[codspeed\ncolored 3.0.0\nMSRV 1.80]
    A -->|MSRV 1.80| A
    C[criterion_compat\ncolored 3.0.0\nMSRV 1.80] -->|depends on| B
    D[bencher_compat\nMSRV 1.80] -->|depends on| B
    B -->|uses| E[colored 3.1.1\nno lazy_static\nwindows-sys 0.52]
    C -->|uses| E
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"}}}%%
flowchart TD
    A[cargo-codspeed] -->|depends on| B[codspeed\ncolored 3.0.0\nMSRV 1.80]
    A -->|MSRV 1.80| A
    C[criterion_compat\ncolored 3.0.0\nMSRV 1.80] -->|depends on| B
    D[bencher_compat\nMSRV 1.80] -->|depends on| B
    B -->|uses| E[colored 3.1.1\nno lazy_static\nwindows-sys 0.52]
    C -->|uses| E
Loading

Reviews (2): Last reviewed commit: "chore!: update colored dep" | Re-trigger Greptile

Comment thread crates/codspeed/Cargo.toml
Comment thread crates/criterion_compat/Cargo.toml
@GuillaumeLagrange GuillaumeLagrange merged commit b30ce7d into CodSpeedHQ:main Jun 19, 2026
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.

4 participants