-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Proper way to use rerun-if-env-changed? #5630
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
Comments
I am sorry, I don't quite understand the problem you are hitting. Can you post a minimal reproducible example? Then maybe we can figure out if |
Okay, well this is the 3rd party package which I was talking about: https://github.com/pedrosland/mmal-sys/blob/master/build.rs The libs are not located in the default path it panics which means it never gets to be rerun since the build stops on a panic. So I was wondering what is the proper way to communicate this error (not being able to find the libs) while also maintaining compatibility with overriding and rerunning the build script? |
See also: rust-lang/rfcs#2391 |
So let me see if I understand. Your code depends on |
@Eh2406 That is exactly correct. |
I don't think a If you are building a final artifact than you may need to have a build system around cargo to set the |
@Eh2406 you are indeed correct! This is something that'll need to be set by an outer build system rather than a crate |
Okay, thank you for the info everyone. |
What the proper way of using
rerun-if-env-changed
? I am using a library where I am trying to pass in an env var from my applicationbuild.rs
usingcargo:rustc-env
but the problem is the library which depends on the env var fails before it can be rerun. If set the env var prior or if I change the code around in the library then it can compile fine. Just not sure what the intended use case is.The text was updated successfully, but these errors were encountered: