Latest targets file breaks MSBuild incremental build.#211
Conversation
…ssing breaking incremental build.
|
You're on fire. Thanks for all the improvements! 👍 |
|
At the same time I'm confused by the MSBuild behavior here, as it thinks midlrt.rsp is a build output before making this change. Maybe @rainersigwald can explain why that happens? |
|
Thanks Johan, we'll probably need another solution, as deleting was necessary for razzle builds. |
|
Can you share a binlog of a case where the incremental build was decided incorrectly? |
Scottj1s
left a comment
There was a problem hiding this comment.
On second thought, I think razzle should be happy with this. Can you verify?
|
I'll approve for now, and re-evaluate razzle when migration is complete |
|
@Scottj1s if you can provide me with a directory to build and location of the targets in razzle I can give it a shot. |
|
@rainersigwald I'll send you the binlog offline. |
|
Thanks for the logs!
On the second execution, two things happen:
I don't think the problem was the delete, but the unconditional overwrite, which is still there. How did you validate that this helped? I'd suggest using the |
|
@rainersigwald With this change the incremental build works in VS. That's how I validated this. |
|
@rainersigwald let me get you two new files where these changes are applied. |
|
WrtiteOnlyWhenDifferent makes quite a bit of difference when running MSBuild directly! |
|
Confusingly, builds in Visual Studio have two levels of incrementality:
It sounds like your initial fix was enough to convince the C++ project system that the project was up to date, so it didn't invoke MSBuild, but the binlog showed that when MSBuild was invoked (as in a command-line build) the MIDL task was still running (and then causing a cascade: everything that depended on the One thing I forgot to mention that might be relevant since I see the word "Razzle" above: |
|
@Scottj1s can confirm, but I think Windows would have MSBuild 15.0 as C++/WinRT is generally quite up-to-date with regards to tooling requirements.
Nevermind, the commandline would be the same if the content of one of the files changed in which case we would still have to rerun the command. This only works for the midl case as it processes each file individually. |
|
I am seeing at least one usage of WriteOnlyWhenDifferent in the razzle tooling, so it seems like it should be available. |
|
/cc @jevansaks for incremental build improvements that this might result in. |
Scottj1s
left a comment
There was a problem hiding this comment.
Thanks Rainer and Johan for the improvements.
This PR removes the Delete tasks meant to cleanup rsp files and instead puts them in the $(IntDir). The Delete of midl.rsp causes MSBuild to always think that files are missing breaking incremental build.
Additionally this also help diagnosing issues if the rsp files would ever contain invalid input.
How verified.
After making these changes, incremental builds work again.