-
Notifications
You must be signed in to change notification settings - Fork 307
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
Cargo expand fails on windows within deeply nested folders #903
Comments
This workaround seems to work for me. from: #347 let crate_dir = env::var("CARGO_MANIFEST_DIR").expect("invalid manifest dir");
env::set_var("CARGO_EXPAND_TARGET_DIR", crate_dir.clone()); Could be a cargo expand issue perhaps, or the way cbindgen is invoking cargo-expand 🤷♂️ |
Yeah this seems unlikely to be a cbindgen bug per se, and more of a windows limitation with long command line arguments / paths... |
ya. I run into permutations of this in various different ways in rust/javascript ecosystems. Should windows "be better"... Of course. Will it? ...no |
I don't think this is actionable on cbindgen's side unless we can somehow shorten the window paths or something... If you think there's anything we could do better here let me know and we can re-open / fix it :) |
Hello,
Cargo-expand fails on windows when building the project in a deeply nested folder. I noticed this issue first on a CI for which i do not easily control the directories used, so i can't simply change my directory to work around the issue.
It seems like every build script.exe file is failing to link. Speaking in chat with somebody alluded to the fact that large link commands will some times fail. I suspect something like this is happening. Im not sure.
I created a minimum repository which reproduces the issue here.
Clone the repository into a pretty deep folder on a windows system. (For example
C:\Users\tom\Git\gitlab-runners\atx-zdk\GjRA6MGh9\0\software-engineering\this\is\a\superlong\dir
) and run the commandcargo build --target thumbv7em-none-eabi --no-default-features --release
. You will see some cargo-expand failure with error code 1104 file not found errors. And note that build_script.exe's are not found.Run the same command in a more sensible windows directory, and the project will compile fine...
The text was updated successfully, but these errors were encountered: