-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Feature Request
Add an option to MSBuild.exe:
- [Discussion] Add an option to MSBuild to enable this mode. It can either warn or error. In the case to warn, only issue one warning per (? project or node). ie. msbuild.exe -i:error
- Error out once a <Target> with Inputs and Output detects files are out of date.
- Error out in ToolTask when SkipTaskExecution returns false.
- Error out in WriteLinesToFile task when WriteOnlyWhenDifferent is true and write is engaged.
- Error out in Copy task when SkipUnchangedFiles is true and copy operation is engaged.
- ... other task ... ? Other task could be added later.
- Expose this property that is accessible from 3rd task.
Reason
The two use case that comes to mind is testing and investigation. At the moment, its very hard to test if the build is incremental. At status quo, the incremental build is just a shorter build. Its hard prove that the shorter build is truly incremental. A test can parse the log but that is not consistent and requires a custom tests for each target/task.
When there is an incremental issue, investigation is slow because parsing the log is hard as Task and Targets print different messages and its difficult to determine which was the first item that broke incremental. Adding a universal message can help but it might not suit all use cases. Another benefit of an error is the shorter rerun time.
I scoped the feature down to minimal and non-breaking. Other solution exists and open for discussion.
Thanks.