Closed alfiedotwtf closed 1 week ago
Comparing alfie/6179-cargo-workspace-version
(4957517) with master
(a073a95)
โก 1
improvements
โ 1
regressions
โ
20
untouched benchmarks
:warning: Please fix the performance issues or acknowledge them on CodSpeed.
Benchmark | master |
alfie/6179-cargo-workspace-version |
Change | |
---|---|---|---|---|
โก | code_lens |
6.1 ยตs | 5.5 ยตs | +11.09% |
โ | document_symbol |
4.3 ms | 5.2 ms | -17.31% |
nice ๐
Awesome to see this. so much cleaner.
Just forced-pushed to remove a comment that I accidentally left in while testing
Edit: And added more documentation to narrow down to a single GitHub Actions job
Description
This PR relates to #6179 which aims to simplify individual workspace member dependency versioning by deferring upstream to the workspace dependencies itself.
I've also extended #6179 as it currently only relates to external dependencies - I've noticed that whenever Sway has a version bump, the diffs manually update all of the many
Cargo.toml
files to the new globally shared version. We can also use workspaces here to defer eachCargo.toml
package version to the workspace package version as well.This PR is in 3 parts:
Cargo.toml
external dependencies to use the shared versions defined in the workspace dependenciesCargo.toml
package version to defer to the workspace package version.If an individual workspace member needs to break away from the shared workspace package version, we can still do that:
Cargo.toml
to the new version (as normal)Notes:
[dev-dependencies]
was not factored out since[workspace.dev-dependencies]
is currently not supported byCargo.toml
, meaning all dev dependencies would have to be brought into[workspace.dependencies]
which I assume is not what we would want to do.[target.'cfg(not(target_os = "macos"))'.dependencies]
was not factored out since these crates should only be brought in if the condition is met, but again as the only way to do this would be to move it to[workspace.dependencies]
, I would advise to keep them separated.Checklist
Breaking*
orNew Feature
labels where relevant.