Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't put Cargo into the rustc workspace #40297

Merged
merged 1 commit into from
Mar 11, 2017

Conversation

alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Mar 6, 2017

This causes problems when first cloning and bootstrapping the repository
unfortunately, so let's ensure that Cargo sticks around in its own workspace.
Because Cargo is a submodule it's not available by default on the inital clone
of the rust-lang/rust repository. Normally it's the responsibility of the
rustbuild to take care of this, but unfortunately to build rustbuild itself we
need to resolve the workspace conflicts.

To deal with this we'll just have to ensure that all submodules are in their own
workspace, which sort of makes sense anyway as updates to dependencies as
bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
case this commit removes Cargo from the global workspace which should resolve
the issues that we've been seeing.

To actually perform this the cargo submodule has been moved to a new vendor
directory to ensure it's outside the scope of src/Cargo.toml as a workspace.

Closes #40284

@alexcrichton
Copy link
Member Author

r? @brson

@rust-highfive rust-highfive assigned brson and unassigned nikomatsakis Mar 6, 2017
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@brson
Copy link
Contributor

brson commented Mar 6, 2017

This likes like it's putting a submodule into src/vendor, which does not seem like a suitable place for submodules. Why src/vendor? Isn't this where the vendored sources live?

@alexcrichton
Copy link
Member Author

Ah yeah unfortunately src/vendor won't work b/c it's hierarchically below src/Cargo.toml, which means it still tries to be part of the workspace.

I could send a commit to Cargo with [workspace] which I believe will disable this though, if you'd prefer. I thought though at some point we were gonna try and wrangle all our third-party deps in vendor/*, although I may be misremembering.

@brson
Copy link
Contributor

brson commented Mar 6, 2017

If the options are putting this in src/vendor or giving cargo its own workspace I prefer the latter. We wouldn't put all the other submodules into src/vendor, or the other tools, I think - istm src/vendor is purely for incidental dependencies, not for the actual tools that are part of Rust.

@alexcrichton
Copy link
Member Author

Unfortunately I can't give Cargo it's own workspace due to CI errors caused by existing bugs in Cargo.

That to me means the only solution is to put Cargo in some external directory for now. I hope to fix rust-lang/cargo#3192 soon though which I believe should allow us to get the "ideal" hierarchy in the future.

@brson how do you feel about vendor (not src/vendor, just vendor) in the meantime?

@@ -559,7 +559,7 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules {
rules.build("tool-qemu-test-client", "src/tools/qemu-test-client")
.dep(|s| s.name("libstd"))
.run(move |s| compile::tool(build, s.stage, s.target, "qemu-test-client"));
rules.build("tool-cargo", "src/tools/cargo")
rules.build("tool-cargo", "vendor/cargo")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really mean "vendor/" here?

@brson
Copy link
Contributor

brson commented Mar 7, 2017

r=me with comment addressed

@alexcrichton
Copy link
Member Author

@bors: r=brson

@bors
Copy link
Contributor

bors commented Mar 7, 2017

📌 Commit b75116d has been approved by brson

@alexcrichton
Copy link
Member Author

For posterity, we decided to put cargo into a top-level dir for now. That's not scalable but we'll fix the bug in Cargo soon which prevents Cargo from going into a "proper" location.

@bors
Copy link
Contributor

bors commented Mar 9, 2017

🔒 Merge conflict

@alexcrichton
Copy link
Member Author

@bors: retry

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Mar 9, 2017
Don't put Cargo into the rustc workspace

This causes problems when first cloning and bootstrapping the repository
unfortunately, so let's ensure that Cargo sticks around in its own workspace.
Because Cargo is a submodule it's not available by default on the inital clone
of the rust-lang/rust repository. Normally it's the responsibility of the
rustbuild to take care of this, but unfortunately to build rustbuild itself we
need to resolve the workspace conflicts.

To deal with this we'll just have to ensure that all submodules are in their own
workspace, which sort of makes sense anyway as updates to dependencies as
bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
case this commit removes Cargo from the global workspace which should resolve
the issues that we've been seeing.

To actually perform this the `cargo` submodule has been moved to a new `vendor`
directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.

Closes rust-lang#40284
@alexcrichton
Copy link
Member Author

@bors: p=1

We're not getting nightlies because of this

@bors
Copy link
Contributor

bors commented Mar 10, 2017

🔒 Merge conflict

@alexcrichton
Copy link
Member Author

@bors: retry

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 10, 2017
Don't put Cargo into the rustc workspace

This causes problems when first cloning and bootstrapping the repository
unfortunately, so let's ensure that Cargo sticks around in its own workspace.
Because Cargo is a submodule it's not available by default on the inital clone
of the rust-lang/rust repository. Normally it's the responsibility of the
rustbuild to take care of this, but unfortunately to build rustbuild itself we
need to resolve the workspace conflicts.

To deal with this we'll just have to ensure that all submodules are in their own
workspace, which sort of makes sense anyway as updates to dependencies as
bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
case this commit removes Cargo from the global workspace which should resolve
the issues that we've been seeing.

To actually perform this the `cargo` submodule has been moved to a new `vendor`
directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.

Closes rust-lang#40284
arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 10, 2017
Don't put Cargo into the rustc workspace

This causes problems when first cloning and bootstrapping the repository
unfortunately, so let's ensure that Cargo sticks around in its own workspace.
Because Cargo is a submodule it's not available by default on the inital clone
of the rust-lang/rust repository. Normally it's the responsibility of the
rustbuild to take care of this, but unfortunately to build rustbuild itself we
need to resolve the workspace conflicts.

To deal with this we'll just have to ensure that all submodules are in their own
workspace, which sort of makes sense anyway as updates to dependencies as
bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
case this commit removes Cargo from the global workspace which should resolve
the issues that we've been seeing.

To actually perform this the `cargo` submodule has been moved to a new `vendor`
directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.

Closes rust-lang#40284
arielb1 pushed a commit to arielb1/rust that referenced this pull request Mar 10, 2017
Don't put Cargo into the rustc workspace

This causes problems when first cloning and bootstrapping the repository
unfortunately, so let's ensure that Cargo sticks around in its own workspace.
Because Cargo is a submodule it's not available by default on the inital clone
of the rust-lang/rust repository. Normally it's the responsibility of the
rustbuild to take care of this, but unfortunately to build rustbuild itself we
need to resolve the workspace conflicts.

To deal with this we'll just have to ensure that all submodules are in their own
workspace, which sort of makes sense anyway as updates to dependencies as
bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
case this commit removes Cargo from the global workspace which should resolve
the issues that we've been seeing.

To actually perform this the `cargo` submodule has been moved to a new `vendor`
directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.

Closes rust-lang#40284
This causes problems when first cloning and bootstrapping the repository
unfortunately, so let's ensure that Cargo sticks around in its own workspace.
Because Cargo is a submodule it's not available by default on the inital clone
of the rust-lang/rust repository. Normally it's the responsibility of the
rustbuild to take care of this, but unfortunately to build rustbuild itself we
need to resolve the workspace conflicts.

To deal with this we'll just have to ensure that all submodules are in their own
workspace, which sort of makes sense anyway as updates to dependencies as
bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
case this commit removes Cargo from the global workspace which should resolve
the issues that we've been seeing.

To actually perform this the `cargo` submodule has been moved to the top
directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.
@alexcrichton
Copy link
Member Author

@bors: r=brson

@bors
Copy link
Contributor

bors commented Mar 10, 2017

📌 Commit c65996e has been approved by brson

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 11, 2017
Don't put Cargo into the rustc workspace

This causes problems when first cloning and bootstrapping the repository
unfortunately, so let's ensure that Cargo sticks around in its own workspace.
Because Cargo is a submodule it's not available by default on the inital clone
of the rust-lang/rust repository. Normally it's the responsibility of the
rustbuild to take care of this, but unfortunately to build rustbuild itself we
need to resolve the workspace conflicts.

To deal with this we'll just have to ensure that all submodules are in their own
workspace, which sort of makes sense anyway as updates to dependencies as
bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any
case this commit removes Cargo from the global workspace which should resolve
the issues that we've been seeing.

To actually perform this the `cargo` submodule has been moved to a new `vendor`
directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.

Closes rust-lang#40284
@bors
Copy link
Contributor

bors commented Mar 11, 2017

⌛ Testing commit c65996e with merge ee972fd...

@alexcrichton
Copy link
Member Author

@bors: retry

@bors
Copy link
Contributor

bors commented Mar 11, 2017

⌛ Testing commit c65996e with merge 3070712...

@alexcrichton
Copy link
Member Author

@bors: retry

@bors
Copy link
Contributor

bors commented Mar 11, 2017

⌛ Testing commit c65996e with merge 1727b23...

@bors bors merged commit c65996e into rust-lang:master Mar 11, 2017
@alexcrichton alexcrichton deleted the fix-submodules branch March 11, 2017 16:29
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.

error: failed to read src/tools/cargo/Cargo.toml
5 participants