-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Allow to use cargo changes tracking to avoid excessive runs of build.rs #19
Comments
What's the current system to deal with this? It seems like I need to manually cargo clean at random intervals in order to avoid downright bizarre errors that ultimately seem to somehow be related to build.rs not running when it should. Ideally, in my project, it would just run every time that cargo run or cargo build is called. |
@john01dav I usually move resources to separate crate and use some feature flag to exclude it from regular build while I am working on something other. Also of course you can just write those instructions by hand after resource generation. |
I don't see how moving static file things to a separate crate fixes the issue where my underlying files change but build.rs does not rerun. In case it's relevant, since the files that actix-web-static-files packages are generated by npm, they are .gitignored, and this might interfere with the normal system. |
Sorry, probably I got your question wrong. Then probably you can add those instructions by hand. More info you can find here: https://doc.rust-lang.org/cargo/reference/build-scripts.html#change-detection I have feeling this feature works strange, need to experiment more with that before I can really give a good advice here. |
Created new crate to handle this: change-detection. Need to think a little bit, how to integrate this with |
Created one more crate to help: path-matchers |
Example from typical
build.rs
:This allows to run
build.rs
only ifbuild.rs
changed. Similar we can add static files to list of changes. This needs to be tested for new files case also.The text was updated successfully, but these errors were encountered: