Closed
Description
I had a problem while using vulkano-shaders, I narrowed the problem down to this example.
https://gitlab.com/pac85/shaderc-test
I couldn't pin point the exact problem.
If you run the test with the stable compiler everything is fine, if you use nightly the macro panics.
If you take the code inside the macro and run it normally it runs just fine.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
pietroalbini commentedon Oct 4, 2020
@Mark-Simulacrum the reporter says this works on stable but not on beta. cc @rust-lang/release
pietroalbini commentedon Oct 4, 2020
Hmm, wait, I can't reproduce on stable, beta nor nightly. @pac85 does it still return an error if you remove the target directory first?
Mark-Simulacrum commentedon Oct 4, 2020
Do we have the panic message? There were several macro-related breaking changes this cycle, I think.
I won't have a chance to try to reproduce locally or minimize for a bit, @rustbot ping cleanup - could we get a bisection and/or mcve?
rustbot commentedon Oct 4, 2020
Error: Parsing ping command in comment failed: ...'ng cleanup' | error: expected end of command at >| ' - could w'...
Please let
@rust-lang/release
know if you're having trouble with this bot.[-]Code behaves differently when inside macro when ausing nightly[/-][+]Code behaves differently when inside macro when using nightly[/+]pac85 commentedon Oct 4, 2020
@pietroalbini
Error message
ehuss commentedon Oct 4, 2020
I think this is the same as #76980. For some reason, shaderc-sys is experiencing some corruption when running within
rustc
as a proc-macro. In particular, this line is a C++ostringstream
that on stable computes correctly (this particular instance evalutes to the string"#line 1 \"std/foo"
, but on nightly it is corrupted (it evaluates to"#line "
).pietroalbini commentedon Oct 4, 2020
Ok, I was running
cargo build
, notcargo test
. Can confirm it's broken on beta and nightly, and it works on stable.pietroalbini commentedon Oct 4, 2020
@rustbot ping cleanup
8 remaining items