-
Notifications
You must be signed in to change notification settings - Fork 486
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
Crate can't build offline #606
Comments
Unfortunately, I'm not aware of any other way to get the workspace dir. I had hoped there would be an environment variable, as there is for From what I can tell, there have been attempts to add such an environment variable but it has always run into blocking issues. So it may be best to fix the offline bug in |
|
@rylev the original issue mentions that the offline flag doesn't work. |
Whoops, sorry totally missed that! |
I did however just try running |
I have added the |
Thanks! Version |
Summary
Expected behavior:
windows-rs
builds successfully offline with a local-registryActual behavior:
windows-rs
build fails with a cryptic error messageIt seems there are three sub-bugs here:
cargo metadata
doesn't work offline, even ifwindows-rs
was supplying--offline
(see cargo metadata --offline requires Internet access rust-lang/cargo#9273).windows-rs
discards the errors from thecargo metadata
invocation. This makes debugging tricky.cargo metadata
doesn't currently work offline, is there another place we can get thisworkspace_root
from?Details
Error example
Repro steps
C
that depends onwindows-rs
.cargo local-registry
to create a local registry forC
's dependencies.C
with the local registry replacingcrates.io
. The build should fail with a cryptic error from thewindows-rs
build. To reproduce the error message I have above, modifying this line inside the local registry's copy ofwindows_winmd
crate. There is almost certainly a simpler repro, but a repro shouldn't be strictly necessary to verify this bug has been fixed.The text was updated successfully, but these errors were encountered: