-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-ArchitectureBig architectural things which we need to figure up-front (or suggestions for rewrites :0) )Big architectural things which we need to figure up-front (or suggestions for rewrites :0) )S-unactionableIssue requires feedback, design decisions or is blocked on other workIssue requires feedback, design decisions or is blocked on other work
Description
The standard library may depend on crates from crates.io, and some of them can be required to properly analyze libstd, like cfg_if
, which caused #6038 in the past. We currently use a hard-coded dependency graph for the sysroot, but have no mechanism to detect or obtain the sources of crates.io dependencies.
We should figure out a way to properly solve this. There are a few options:
- The
rust-src
component could vendor the sources of crates.io dependencies (this seems insufficient though, we might still need to address one of the points below). - We can use the Cargo.lock of the rust-lang/rust monorepo to resolve libstd dependencies via
cargo metadata
, but this requires creating a temporary directory or mutating rustup-installed directories, which is a bad idea. - The compiler and standard library could be split into 2 workspaces, each with their own
Cargo.lock
. Then we could runcargo metadata --locked
without requiring any disk operations besides index and crate downloads.
jyn514, luojia65, noproto, GrayJack, lowr and 3 more
Metadata
Metadata
Assignees
Labels
C-ArchitectureBig architectural things which we need to figure up-front (or suggestions for rewrites :0) )Big architectural things which we need to figure up-front (or suggestions for rewrites :0) )S-unactionableIssue requires feedback, design decisions or is blocked on other workIssue requires feedback, design decisions or is blocked on other work