Skip to content

Conversation

@vypxl
Copy link
Contributor

@vypxl vypxl commented Feb 9, 2026

Motivation

Resolves #445

I've come across the same problem as described in the mentioned issue, and for us, it is causing many wasted CI build minutes. That's why I set out to fix it.

This adds a new flag 'doStripVersion', which can be used to set the versions of workspace crates to a placeholder value. Doing this in the Cargo.lock and Cargo.toml's means we can reuse the dependency cache when we bump versions of our workspace crates.

Checklist

  • added tests to verify new behavior
  • added an example template or updated an existing one
  • updated docs/API.md (or general documentation) with changes
  • updated CHANGELOG.md

@vypxl vypxl force-pushed the ignore-version-in-deps branch from 50c71f5 to e2ed5c4 Compare February 9, 2026 16:10
@vypxl vypxl force-pushed the ignore-version-in-deps branch from e2ed5c4 to 03d96f9 Compare February 9, 2026 16:26
@vypxl vypxl marked this pull request as ready for review February 9, 2026 16:28
@ipetkov
Copy link
Owner

ipetkov commented Feb 11, 2026

Thanks for the PR @vypxl!

The problem I ran into the last time I looked into this is the fact that cargo will refuse to reuse artifacts from two different versions of the same crate, making the version cleanup moot. With published crates this obviously makes sense (two different versions most likely have different sources) but I suspect cargo handles even workspace-members in the same way.

The real key here is that we add a compilesFresh test with this option enabled. If that passes great! But if not, the cache invalidation would make this effort moot

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.

unnecessary rebuild of unrelated packages in monorepo on member version bump

2 participants