Not compiling on windows when uses a path.
Created by: tensor-programming
This is sort of a strange error that only has started to appear from what I understand. If I have a contract and the lib.rs
file is not on the level of the cargo.toml
file, say inside of src/lib.rs
, the project will not compile on windows. This seems to have something to do with the way that the path is being read from the Cargo.toml
file. It seems like the path is not being normalized from the windows format into a format that can be understood by the compiler. The error looks like this:
couldn't read \\?\C:\Projects\rust\contracts\wrapr\src/lib.rs: The filename, directory name, or volume label syntax is incorrect.
(os error 123)
ERROR: `"\\\\?\\C:\\path\\to\\cargo\\nightly\\cargo.exe" "build" "--target=wasm32-unknown-unknown"
"-Zbuild-std" "-Zbuild-std-features=panic_immediate_abort" "--no-default-features" "--release" "--target-
dir=C:\\Projects\\rust\\contracts\\wrapr\\target\\ink" "--features=ink_env/ink-debug"` failed with exit code: Some(101)
The same project will compile fine if I take the lib.rs
out of the src
folder and change the path key to not have any kind of folder in between it.
Platform: Windows 10 Compiler: Latest Nightly msvc compiler.
Contract will build fine if the lib.rs
is not in a folder though.