rust/src/tools/rustc-workspace-hack
Weihang Lo e52e040fba
Update cargo
23 commits in 9880b408a3af50c08fab3dbf4aa2a972df71e951..c1334b059c6dcceab3c10c81413f79bb832c8d9d
2023-02-28 19:39:39 +0000 to 2023-03-07 19:21:50 +0000

- Add `CARGO_PKG_README` (rust-lang/cargo#11645)
- path dependency: fix cargo-util version (rust-lang/cargo#11807)
- Adding display of which target failed to compile (rust-lang/cargo#11636)
- Fix `CARGO_CFG_` vars for configs defined both with and without value (rust-lang/cargo#11790)
- Breaking endless loop on cyclic features in added dependency in cargo-add (rust-lang/cargo#11805)
- Enhance the doc of timing report with graphs (rust-lang/cargo#11798)
- Make `sparse` the default protocol for crates.io (rust-lang/cargo#11791)
- Use sha2 to calculate SHA256 (rust-lang/cargo#11795)
- gitoxide progress bar fixes (rust-lang/cargo#11800)
- Check publish_to_alt_registry publish content (rust-lang/cargo#11799)
- chore: fix missing files in autolabel trigger_files (rust-lang/cargo#11797)
- chore: Update base64 (rust-lang/cargo#11796)
- Fix some doc typos (rust-lang/cargo#11794)
- chore(ci): Enforce cargo-deny in CI (rust-lang/cargo#11761)
- Some cleanup for unstable docs (rust-lang/cargo#11793)
- gitoxide integration: fetch (rust-lang/cargo#11448)
- patch can conflict on not activated packages (rust-lang/cargo#11770)
- fix(toml): Provide a way to show unused manifest keys for dependencies (rust-lang/cargo#11630)
- Improve error for missing crate in --offline mode for sparse index (rust-lang/cargo#11783)
- feat(resolver): `-Zdirect-minimal-versions` (rust-lang/cargo#11688)
- feat: Use test name for dir when running tests (rust-lang/cargo#11738)
- Jobserver cleanup (rust-lang/cargo#11764)
- Fix help string for  "--charset" option of "cargo tree" (rust-lang/cargo#11785)

Note that some 3rd-party licensing allowed list changed due to the
introducion of `gix` dependency
2023-03-07 22:19:16 +00:00
..
Cargo.toml Update cargo 2023-03-07 22:19:16 +00:00
lib.rs
README.md Sunset RLS 2022-08-27 21:36:08 -07:00

rustc-workspace-hack

This crate is a bit of a hack to make workspaces in rustc work a bit better. The rationale for this existence is a bit subtle, but the general idea is that we want commands like ./x.py build src/tools/{clippy,cargo} to share as many dependencies as possible.

Each invocation is a different invocation of Cargo, however. Each time Cargo runs a build it will re-resolve the dependency graph, notably selecting different features sometimes for each build.

For example, let's say there's a very deep dependency like winapi in each of these builds. For Cargo, winapi has 33 features enabled. In Clippy, however, winapi has 22 features enabled. This means that building Cargo and then the Clippy will actually build winapi twice, which in turn will build duplicates of everything that depends on winapi. This is bad!

The goal of this crate is to solve this problem and ensure that the resolved dependency graph for all of these tools is the same in the various subsets of each tool, notably enabling the same features of transitive dependencies.

All tools vendored here depend on the rustc-workspace-hack crate on crates.io. When on crates.io this crate is an empty crate that is just a noop. We override it, however, in this workspace to this crate here, which means we can control crates in the dependency graph for each of these tools.