[win] Fix git apply failures in incremental builds#22075
[win] Fix git apply failures in incremental builds#22075bellenot wants to merge 1 commit intoroot-project:masterfrom
git apply failures in incremental builds#22075Conversation
On Windows, delete the source directories of a couple of builtins to make sure there is no conflict with `git apply` on already patched files in incremental builds and add `LOG_PATCH 1`
linev
left a comment
There was a problem hiding this comment.
I suspect it has something to do with wired file modification time on Windows.
I saw same problem on my Windows as well.
It is workaround but seems to be the only way to solve problem.
ferdymercury
left a comment
There was a problem hiding this comment.
Thanks, LGTM.
Just out of curiosity:
Did you try instead "undefining" the UPDATE command? See https://stackoverflow.com/questions/56986726/cmake-externalproject-add-rebuilds-every-time
UPDATE_COMMAND ""
If that doesn't help, wouldn't it be cleaner to call something like ExternalProject_Add_Step that reverts the previously applied patch using
git apply patch -R whatever.patch before applying the new one? Rather than deleting the whole source.
Maybe on the first run, applying --ignore-whitespace leads to issues on a second run?
There are also some flags such as --inaccurate-eof but no idea.
Also, maybe a more up-to-date git version helps?
|
@ferdymercury I already tried all of what you suggest, except up-to-date git version. Will try |
|
@ferdymercury it seems the latest git version ( |
|
I using git |
ferdymercury
left a comment
There was a problem hiding this comment.
Seems alma10 does not like the new changes
(or maybe needs clean-build label?)
That cannot be this PR, my changes are inside |
ahh. So then maybe the failure in git apply patch incremental builds is not only for windows but also for unix ? |
That might well be... |
|
Yes, same errors: |
|
Seems we're not the first ones: Maybe setting |
Already tried... |
On Windows, delete the source directories of a couple of builtins to make sure
there is no conflict with
git applyon already patched files in incremental buildsand add
LOG_PATCH 1