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

Inconsistent behavior with include_str! between stable and nightly #73551

Closed
nightmared opened this issue Jun 20, 2020 · 3 comments
Closed

Inconsistent behavior with include_str! between stable and nightly #73551

nightmared opened this issue Jun 20, 2020 · 3 comments
Labels
C-bug Category: This is a bug.

Comments

@nightmared
Copy link

nightmared commented Jun 20, 2020

Hello,
someone reported on tokio-rs/tracing#755 some weird behavior with include_str! not behaving appropriately (when using async-trait and tokio-rs/tracing), where rustc end up searching for the file to be included in a wrong directory. Turns out this builds on nightly but not on stable.

More precisely: https://github.com/Txuritan/tie is the reproducer, it builds fine any rustc built after 9b2b8a5, but fails on anything before that, including stable, with the following error:

error: couldn't read src/text.txt: No such file or directory (os error 2)
 --> src/lib.rs:1:1
  |
1 | / mod example;
2 | |
3 | | #[async_trait::async_trait]
4 | | pub trait Test {

According to my nonexistent git-bisect skills, "9b2b8a5afa833795b66267684615497c9547878d is the first bad commit" (where bad is actually good here, it means the crate compiles). So it look like it's some broken span reporting/propagation that was fixed in master since. That's about everything I know, but knowing the precise commit narrow things down a fair bit, I believe.

Hope this can help !

@nightmared nightmared added the C-bug Category: This is a bug. label Jun 20, 2020
@ratijas
Copy link
Contributor

ratijas commented Jun 20, 2020

"9b2b8a5afa833795b66267684615497c9547878d is the first bad commit"

Here: 9b2b8a5. Now it behaves like a link.

@nightmared
Copy link
Author

This really appears to be part of #43081, and is fixed by one the commit related to this issue.

@nightmared
Copy link
Author

Considering there have been multiple stable releases where this issue is fixed since the moment this issue was opened, I'm closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants