- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Git isDirty triggers rebuilds #183
Labels
Comments
AmoreCadenza
added a commit
to AmoreCadenza/GitInfo
that referenced
this issue
Mar 4, 2022
This change fixes what looks like a bug in the current implementation of the `_GitRoot` target: namely, that the target always appends a `0` or `1`, on a new line, to the `_GitIsDirtyFile` every time said target runs, causing all other targets that depend on it as an input to always rerun as well. Ultimately, this breaks incremental builds of projects that rely on the `GitInfo` package. With this change, the `_GitIsDirtyFile` behaves as its logic appears to have been intended to: instead of always appending the current value of `$(GitIsDirty)` to the file, the current value of `($GitIsDirty)` will replace the file's contents if and only if the value differs from what's already in the file. Otherwise, the file remains untouched and all other targets that use it as an input will function as expected in incremental builds. This fixes or at least significantly mitigates the problems described in devlooped#183.
kzu
pushed a commit
that referenced
this issue
Aug 5, 2022
This change fixes what looks like a bug in the current implementation of the `_GitRoot` target: namely, that the target always appends a `0` or `1`, on a new line, to the `_GitIsDirtyFile` every time said target runs, causing all other targets that depend on it as an input to always rerun as well. Ultimately, this breaks incremental builds of projects that rely on the `GitInfo` package. With this change, the `_GitIsDirtyFile` behaves as its logic appears to have been intended to: instead of always appending the current value of `$(GitIsDirty)` to the file, the current value of `($GitIsDirty)` will replace the file's contents if and only if the value differs from what's already in the file. Otherwise, the file remains untouched and all other targets that use it as an input will function as expected in incremental builds. This fixes or at least significantly mitigates the problems described in #183.
Fixed in #184 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the Bug
The isDirty flag triggers a rebuild on projects that depend on GitInfo. This is even for projects that do not make use of the dirty property. The value is also quite often incorrect, which makes it useless.
Is there an option to ignore the isDirty flag?
Steps to Reproduce
Make use of GitInfo and rebuild a project. The compiler rebuilds the project when the dirty flag has incorrectly changed.
Expected Behavior
That it is possible to disable isDirty and that the flag is not incorrectly true or false.
Version Info
2.2.0
The text was updated successfully, but these errors were encountered: