Skip to content
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

Changes to the C library do not trigger a rebuild #35

Closed
egrimley-arm opened this issue Jun 26, 2020 · 1 comment · Fixed by #43
Closed

Changes to the C library do not trigger a rebuild #35

egrimley-arm opened this issue Jun 26, 2020 · 1 comment · Fixed by #43
Labels
bug Something isn't working

Comments

@egrimley-arm
Copy link
Collaborator

If the C code in psa-crypto-sys/vendor/ is changed then cargo does not rebuild it.

A work-around is to run touch psa-crypto-sys/build.rs when the C code might have changed.

I think it would be better if build.rs found every file (and perhaps every directory) under vendor/ (there's a crate called walkdir) and emitted cargo:rerun-if-changed=PATH for each one. (Or you could try to more selective, but persuading cmake to tell you which files really matter would probably be too much work.)

@hug-dev
Copy link
Member

hug-dev commented Jun 26, 2020

Thanks for the report!

A work-around is to run touch psa-crypto-sys/build.rs when the C code might have changed.

oh wow I did not know that touch could do that! The name of the command now makes more sense 😄
The walkdir idea seems nice! If we do cargo:rerun-if-changed=vendor, will it detect any change inside the directory? I would say no by default, but maybe here it will since this is a git repository. I am also wondering if we can target a git file in .git (or .git itself) to check for any change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants