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

Don't dirty shadow.rs unless contents have changed #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vlovich
Copy link

@vlovich vlovich commented Jan 31, 2025

Stop spurious rebuilds for any project that uses shadow-rs - even if no source has changed, because the shadow.rs file is blindly clobbered on every build, cargo thinks something has changed due to the directive to rebuild if shadow.rs changes. Instead, check if any of the new contents are actually different, ignoring the "Generation time" header.

Stop spurious rebuilds for any project that uses shadow-rs - even if no
source has changed, because the shadow.rs file is blindly clobbered on
every build, cargo thinks something has changed due to the directive to
rebuild if shadow.rs changes. Instead, check if any of the new contents
are actually different, ignoring the "Generation time" header.
@vlovich
Copy link
Author

vlovich commented Jan 31, 2025

I think this approach may be flawed since variables changing that you expect to cause a rebuild (e.g. amending the git commit) don't.

@vlovich vlovich marked this pull request as draft January 31, 2025 09:11
@baoyachi baoyachi marked this pull request as ready for review February 2, 2025 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant