Skip to content

Tweak how source paths are passed to the compiler #1164

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

Merged
merged 1 commit into from
Jan 14, 2015

Conversation

alexcrichton
Copy link
Member

All paths printed will now be absolute paths unless the path is a descendant of
the current directory. This should keep error messages and warnings of a
reasonable length when working with the local project while still allowing
errors in registry/git dependencies to be tracked down.

Special care is taken in these situations to ensure that the error message from
the compiler prints a reasonable path.

Closes #209
Closes #694
Closes #1081

All paths printed will now be absolute paths unless the path is a descendant of
the current directory. This should keep error messages and warnings of a
reasonable length when working with the local project while still allowing
errors in registry/git dependencies to be tracked down.

Special care is taken in these situations to ensure that the error message from
the compiler prints a reasonable path.

Closes rust-lang#209
Closes rust-lang#694
@rust-highfive
Copy link

r? @huonw

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

@@ -289,3 +296,18 @@ fn filename(target: &Target) -> String {
};
format!("{}{}-{}", flavor, kind, target.get_name())
}

// The dep-info files emitted by the compiler all have their listed paths
Copy link
Member

Choose a reason for hiding this comment

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

Eurgh. Shouldn't these be absolute?

Copy link
Member Author

Choose a reason for hiding this comment

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

Possibly yeah, the source of the "problem" is that we call rustc src/foo.rs so the deps look like src/foo.rs and src/bar.rs instead of /path/to/src/foo.rs. I think that this mirrors gcc behavior, however. Either way, it's pretty easy to tweak in the future.

@huonw
Copy link
Member

huonw commented Jan 14, 2015

@bors: r+ 4a91d01

@bors
Copy link
Contributor

bors commented Jan 14, 2015

⌛ Testing commit 4a91d01 with merge c287aea...

@bors
Copy link
Contributor

bors commented Jan 14, 2015

💔 Test failed - cargo-win-32

@alexcrichton
Copy link
Member Author

@bors: retry

@alexcrichton
Copy link
Member Author

@bors: retr

On Wed, Jan 14, 2015 at 12:55 AM, bors [email protected] wrote:

[image: 💔] Test failed - cargo-win-32
http://buildbot.rust-lang.org/builders/cargo-win-32/builds/725


Reply to this email directly or view it on GitHub
#1164 (comment).

@bors
Copy link
Contributor

bors commented Jan 14, 2015

⌛ Testing commit 4a91d01 with merge ab16980...

@bors
Copy link
Contributor

bors commented Jan 14, 2015

💔 Test failed - cargo-win-32

@alexcrichton
Copy link
Member Author

@bors: retry

@bors
Copy link
Contributor

bors commented Jan 14, 2015

⌛ Testing commit 4a91d01 with merge 7452add...

@bors
Copy link
Contributor

bors commented Jan 14, 2015

💔 Test failed - cargo-win-32

@alexcrichton
Copy link
Member Author

@bors: retry

@bors
Copy link
Contributor

bors commented Jan 14, 2015

⌛ Testing commit 4a91d01 with merge 0e17305...

@bors
Copy link
Contributor

bors commented Jan 14, 2015

💔 Test failed - cargo-win-64

@alexcrichton
Copy link
Member Author

@bors: retry

@bors
Copy link
Contributor

bors commented Jan 14, 2015

⌛ Testing commit 4a91d01 with merge 25fa147...

bors added a commit that referenced this pull request Jan 14, 2015
All paths printed will now be absolute paths unless the path is a descendant of
the current directory. This should keep error messages and warnings of a
reasonable length when working with the local project while still allowing
errors in registry/git dependencies to be tracked down.

Special care is taken in these situations to ensure that the error message from
the compiler prints a reasonable path.

Closes #209
Closes #694
@bors
Copy link
Contributor

bors commented Jan 14, 2015

☀️ Test successful - cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-32, cargo-win-64

@bors bors merged commit 4a91d01 into rust-lang:master Jan 14, 2015
@alexcrichton alexcrichton deleted the issue-209 branch January 20, 2015 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants