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

Garbled error messages when building multiple binaries from same sources #3041

Closed
osklil opened this issue Aug 25, 2016 · 2 comments
Closed

Comments

@osklil
Copy link

osklil commented Aug 25, 2016

If you build two different binaries from the same source files, error messages are repeated and mostly garbled.

How to reproduce

cargo new demo
echo -e '\n[[bin]]\nname = "p1"\npath = "src/main.rs"\n\n[[bin]]\nname = "p2"\npath = "src/main.rs"' >> demo/Cargo.toml
echo something > demo/src/main.rs
cd demo; cargo build

Actual output

   Compiling demo v0.1.0 (file:///home/usel/_t2/demo)
src/main.rs:1:1: 1:10 error: expected item, found `something`
src/main.rs:1:1: 1:10 src/main.rs:1 errorsomething:
              expected item, found `something`^~~~~~~~~

errorsrc/main.rs: aborting due to previous error:1
something
              ^~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: Could not compile `demo`.

To learn more, run the command again with --verbose.

Expected output

   Compiling demo v0.1.0 (file:///[...]/demo)
src/main.rs:1:1: 1:10 error: expected item, found `something`
src/main.rs:1 something
              ^~~~~~~~~
error: aborting due to previous error
error: Could not compile `demo`.

To learn more, run the command again with --verbose.
[more text]
@osklil
Copy link
Author

osklil commented Aug 25, 2016

cargo 0.12.0-nightly (6b98d1f 2016-07-04)

@alexcrichton
Copy link
Member

Thanks for the report! This is actually a dupe of #1198 which is also being fixed over at rust-lang/rust#35975, so I'm going to close in favor of those.

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

No branches or pull requests

2 participants