Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

PMH nested is generating OS path errors #63

Closed
thedodd opened this issue Sep 30, 2020 · 6 comments
Closed

PMH nested is generating OS path errors #63

thedodd opened this issue Sep 30, 2020 · 6 comments

Comments

@thedodd
Copy link

thedodd commented Sep 30, 2020

❤️ Hello! Thanks for all of the outstanding work @dtolnay

I am running into an issue with the code here (https://github.com/dtolnay/proc-macro-hack/blob/master/nested/src/lib.rs#L43
) while compiling a WASM application (target is wasm32-unknown-unknown) on a windows host in CI.

error: couldn't read <PATH>\target\wasm32-unknown-unknown\debug\build\proc-macro-nested-aeb0b19be57a6fbe\out/count.rs: The filename, directory name, or volume label syntax is incorrect. (os error 123)
Error:   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\proc-macro-nested-0.1.6\src\lib.rs:43:1
   |
43 | include!(concat!(env!("OUT_DIR"), "/count.rs"));
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

I'm really surprised that this issue hasn't been logged before. I must be missing something. Any pointers would be very helpful. Thank you!

@dtolnay
Copy link
Owner

dtolnay commented Oct 1, 2020

Is there anything in target\wasm32-unknown-unknown\debug\build\proc-macro-nested-aeb0b19be57a6fbe\out?

That file is written by proc-macro-nested's build.rs.

@neonphog
Copy link

seeing this also in github actions windows build -> futures_util 0.3.8 pulls in proc-macro-nested 0.1.6:

error: couldn't read \\?\D:\a\ghost_actor\ghost_actor\target\debug\build\proc-macro-nested-b33ca33ce1709262\out/count.rs: The filename, directory name, or volume label syntax is incorrect. (os error 123)
Error:   --> C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\proc-macro-nested-0.1.6\src\lib.rs:43:1
   |
43 | include!(concat!(env!("OUT_DIR"), "/count.rs"));
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

I see the / has already been fixed into a join() call - just need a new version published.

@dtolnay
Copy link
Owner

dtolnay commented Jan 13, 2021

I was not able to reproduce this in a github actions windows build: #67. Would it be possible for you to open a PR with a minimal repro?

@neonphog
Copy link

Huh, I'm at a loss - I can't reproduce it here either, but its consistently happening on my repo: https://github.com/holochain/ghost_actor/pull/39/checks?check_run_id=1697922602

I'll keep trying to reproduce.

@dtolnay
Copy link
Owner

dtolnay commented Jan 13, 2021

Seems like this is a cargo-task bug, since cargo install cargo-task; cargo task test fails while cargo test --all-features passes, so I'll go ahead and close this issue. The root cause is probably going to be a use of canonicalize somewhere in cargo-task or something that it calls (I found one). canonicalize is almost never a thing you want to do on Windows. rust-lang/rust#42869

@dtolnay dtolnay closed this as completed Jan 13, 2021
@neonphog
Copy link

Awesome, thanks, I'll look in that direction : )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants