Uh oh!
There was an error while loading. Please reload this page.
Use workspaces and switch to a single Cargo.lock. - #36032
Conversation
rust-highfive
commented
Aug 27, 2016
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
ahmedcharles
commented
Aug 27, 2016
And does anyone know why |
alexcrichton
commented
Aug 29, 2016
Thanks for the PR @ahmedcharles! One of my original intentions was that adding a crate was super easy (e.g. didn't require unduly modifying config files), so I'm a little uneasy with these manual lists. I'm afraid it'll make for confusing errors when adding a crate to the compiler or another tool unfortunately. One interesting point, though, is that libstd's and libtest's crate DAGs are quite stable, unlike the compiler's. I wonder if we could implement a hardcoded list of those crates, and avoid having to write down the compiler's DAG as well? I'm envisioning something like this:
This is all kinda unfortunate to do, but hopefully rust-lang/rfcs#1133 will make it easier to implement this as we won't have to split apart the suites. |
ahmedcharles
commented
Aug 29, 2016
Isn't the issue here that bootstrap is forced to read I'm not actually sure how that RFC is related to this at all. If there's a change in cargo in the foreseeable future, then I don't really think it matters much what gets hardcoded today, since it will only last until the next cycle before it can be improved. |
alexcrichton
commented
Aug 30, 2016
Yeah we just need to know what set of The RFC would allows to take these three "pseudo workspaces" and move them all into one, so we can just pass I'd prefer to not land this until we alleviate the restriction of having to modify the build system when adding a crate. Right now we don't have that restriction, and having a workspace isn't really buying us that much as it's all managed internally anyway, so I'd consider this a step backwards if we can't figure it out for now. |
ahmedcharles
commented
Aug 30, 2016
I was under the impression that this would be necessary for getting rustbuild into a better shape for distribution by distros, since it's mentioned in #34687. I assumed that was more than 'casual' priority, hence why I worked on this. :) If using a single workspace is the desired approach, I'd prefer to be able to make forward progress, somehow. If I can write bootstrap in a way that doesn't require updating on crate additions, probably based on cargo metadata, will that be considered for acceptance? My perspective is that if I want to test all of my local crates in one go, how do I do that with cargo today, assuming a workspace with multiple crates? I'd rather solve the general problem, if that makes sense? Perhaps even a As an aside: I'm still not sure how the RFC about making cargo aware of libstd dependencies (to fix cross compiling) will help it tell you how to test a set of path dependences of a given crate (in a generic way)? They seem like two completely distinct problems, so I'm clearly missing something here still. Note, the issue with this commit isn't specific to libstd, it's IMO, a lack of support for testing either path dependencies or workspaces. |
alexcrichton
commented
Aug 30, 2016
Oh right, yes! I had forgotten about rustbuild + distros. So thinking about it more, I think
I wouldn't worry about it, it's not relevant to this PR anyway. |
bors
commented
Sep 1, 2016
☔ The latest upstream changes (presumably #35718) made this pull request unmergeable. Please resolve the merge conflicts. |
As far as I'm concerned, this is a great foundation upon which to continue working after rust-lang/rfcs#1133 :). |
bors
commented
Sep 3, 2016
☔ The latest upstream changes (presumably #35957) made this pull request unmergeable. Please resolve the merge conflicts. |
alexcrichton
commented
Sep 12, 2016
@ahmedcharles any update here about using |
ahmedcharles
commented
Sep 13, 2016
I've been busy with work lately, but I'll get back to this soon. |
alexcrichton
commented
Sep 13, 2016
Ok no worries! Let me know if any surprises come up. |
bors
commented
Sep 14, 2016
☔ The latest upstream changes (presumably #35021) made this pull request unmergeable. Please resolve the merge conflicts. |
This involves hacking the code used to run cargo test on various packages, because it reads Cargo.lock to determine which packages should be tested. This change implements a blacklist, since that will catch new crates when they are added in the future.
bors
commented
Sep 22, 2016
☔ The latest upstream changes (presumably #36551) made this pull request unmergeable. Please resolve the merge conflicts. |
Leverage Cargo workspaces in rustbuild This is a continuation of rust-lang#36032 which implements the change to use `cargo metadata` to learn about the crate graph.
alexcrichton
commented
Oct 10, 2016
Landed with #37016 |
Leverage Cargo workspaces in rustbuild This is a continuation of rust-lang/rust#36032 which implements the change to use `cargo metadata` to learn about the crate graph.
This involves hacking the code used to run cargo test on various
packages, because it reads Cargo.lock to determine which packages should
be tested. This change implements a blacklist, since that will catch new
crates when they are added in the future.