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

Rephrased error message for disallowed sections in virtual workspace #8200

Merged
merged 1 commit into from
May 14, 2020

Conversation

Julian-Wollersberger
Copy link
Contributor

I changed the error message from virtual manifests do not specify [target] to This virtual manifest specifies a [target] section, which is not allowed because the old one confused me.

I encountered it while hacking on Rustc in CLion. I made a change to the Cargo.toml I had copied from StackOverflow and after the next restart code analysis and go-to-definition stopped working. After some fiddling, I tracked that down to my change in Cargo.toml. It took me a while because, like I said, the error message from CLion didn't make sense to me.

19:13	Cargo project update failed:
	Execution failed (exit code 101).
	        /home/julian/.cargo/bin/cargo metadata --verbose --format-version 1 --all-features
	        stdout : error: failed to parse manifest at `/home/julian/Dokumente/Rust/Compiler/rust/Cargo.toml`
	
	Caused by:
	  virtual manifests do not specify [target]
	
	        stderr : 

I hope this change avoids future confusion :)

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 3, 2020
@Julian-Wollersberger
Copy link
Contributor Author

Julian-Wollersberger commented May 3, 2020

I don't understand that test failure. Locally
cargo +stable test rustc_info passes both before and after this patch, but
cargo +nightly test rustc_info fails both before and after this patch.

It seems to not be related to this patch anyway?
Does someone know what's going on?

@ehuss
Copy link
Contributor

ehuss commented May 3, 2020

It is an unrelated error. rust-lang/rust#71716 changed some behavior that is causing that test to fail, and Cargo will need to be updated for it.

@Julian-Wollersberger
Copy link
Contributor Author

Rebased. The previously offending testrustc_info now passes locally.
But this new failure of rebuild_if_build_artifacts_move_forward_in_time also passes locally, both on stable, nightly and self-hosted cargo.
This seems to be unrelated, again.

@ehuss
Copy link
Contributor

ehuss commented May 13, 2020

Hm, I have never seen that error before, and I can't imagine how it is possible. I tried reproducing it, but I couldn't.

---- freshness::rebuild_if_build_artifacts_move_forward_in_time stdout ----
running `/Users/runner/runners/2.168.2/work/1/s/target/debug/cargo build`
running `/Users/runner/runners/2.168.2/work/1/s/target/debug/cargo build`
thread 'freshness::rebuild_if_build_artifacts_move_forward_in_time' panicked at '
Expected: execs
    but: exited with exit code: 101
--- stdout

--- stderr
   Compiling a v0.0.1 (/Users/runner/runners/2.168.2/work/1/s/target/cit/t796/foo/a)
   Compiling foo v0.0.1 (/Users/runner/runners/2.168.2/work/1/s/target/cit/t796/foo)
error: could not parse/generate dep info at: /Users/runner/runners/2.168.2/work/1/s/target/cit/t796/foo/target/debug/deps/foo-d0e39817788fdb93.d

Caused by:
  malformed dep-info format, no targets
note: this is an unexpected cargo internal error
note: we would appreciate a bug report: ***/issues/
note: cargo 1.45.0

Can probably ignore it for now. If it shows up again, we can investigate more.

@@ -1320,43 +1320,43 @@ impl TomlManifest {
config: &Config,
) -> CargoResult<(VirtualManifest, Vec<PathBuf>)> {
if me.project.is_some() {
bail!("virtual manifests do not define [project]");
bail!("This virtual manifest specifies a [project] section, which is not allowed");
Copy link
Member

Choose a reason for hiding this comment

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

Currently all of Cargo's error messages conventionally start with a lowercase letter, mind changing that here? Other than that this seems good to go!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented May 14, 2020

📌 Commit d6a1428 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 14, 2020
@bors
Copy link
Contributor

bors commented May 14, 2020

⌛ Testing commit d6a1428 with merge 2fef2e5...

@bors
Copy link
Contributor

bors commented May 14, 2020

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing 2fef2e5 to master...

@bors bors merged commit 2fef2e5 into rust-lang:master May 14, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 20, 2020
Update cargo

9 commits in cb06cb2696df2567ce06d1a39b1b40612a29f853..500b2bd01c958f5a33b6aa3f080bea015877b83c
2020-05-08 21:57:44 +0000 to 2020-05-18 17:12:54 +0000
- Handle LTO with an rlib/cdylib crate type (rust-lang/cargo#8254)
- Gracefully handle errors during a build. (rust-lang/cargo#8247)
- Update `im-rc` to 15.0.0 (rust-lang/cargo#8255)
- Fix `cargo update` with unused patch. (rust-lang/cargo#8243)
- Rephrased error message for disallowed sections in virtual workspace (rust-lang/cargo#8200)
- Ignore broken console output in some situations. (rust-lang/cargo#8236)
- Expand error message to explain that a string was found (rust-lang/cargo#8235)
- Add context to some fs errors. (rust-lang/cargo#8232)
- Move SipHasher to an isolated module. (rust-lang/cargo#8233)
@ehuss ehuss added this to the 1.45.0 milestone Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants