Skip to content

syntax: Don't put quotes around filenames in codemap #21617

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 26, 2015

Conversation

alexcrichton
Copy link
Member

This ends up propagating all the way out to the output of dep-info which then
makes Cargo think that files are not existent (it thinks the files have quotes
in their name) when they in fact do.

This ends up propagating all the way out to the output of dep-info which then
makes Cargo think that files are not existent (it thinks the files have quotes
in their name) when they in fact do.
@rust-highfive
Copy link
Contributor

r? @nikomatsakis

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

@@ -146,7 +146,7 @@ pub fn expand_include_str(cx: &mut ExtCtxt, sp: Span, tts: &[ast::TokenTree])
Ok(src) => {
// Add this input file to the code map to make it available as
// dependency information
let filename = format!("{:?}", file.display());
let filename = format!("{}", file.display());
Copy link
Member

Choose a reason for hiding this comment

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

Isn't format! here redundant?

@nikomatsakis
Copy link
Contributor

I guess I don't have a particular problem with this commit, except that I expect things like filenames to be quoted or otherwise "set apart" in an error message. It seems surprising to me that cargo is scraping this information from the error -- what if there is a space in the name or something?

@nikomatsakis
Copy link
Contributor

@bors r+ 0dac568

@nikomatsakis
Copy link
Contributor

Giving r+ in any case.

@pnkfelix
Copy link
Member

@nikomatsakis my impression was that cargo is not scraping the info from an error, but rather from the output of rustc --dep-info ? Nonetheless, I too wonder about what happens to paths with spaces.

@bors
Copy link
Collaborator

bors commented Jan 26, 2015

⌛ Testing commit 0dac568 with merge 8ec3a83...

bors added a commit that referenced this pull request Jan 26, 2015
This ends up propagating all the way out to the output of dep-info which then
makes Cargo think that files are not existent (it thinks the files have quotes
in their name) when they in fact do.
@bors
Copy link
Collaborator

bors commented Jan 26, 2015

@bors bors merged commit 0dac568 into rust-lang:master Jan 26, 2015
@alexcrichton alexcrichton deleted the less-quotes branch February 4, 2015 18:04
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.

6 participants