Commit 02a3a62
Skip Updating CopyComplete Marker When Not Necessary (#6698)
Fixes ##6576
### Context
#6576 revealed that the `.copycomplete` file marker is updated even when the `Copy` task in `_GetCopyFilesMarkedLocal` doesn't _actually_ copy anything. This can mess with incremental builds.
### Changes Made
This change adds an output parameter, `CopiedAtLeastOneFile` to the `Copy` task that the `Touch` task is now conditioned off of.
### Testing
Tested local builds
### Notes
This could also be done by having an ITaskItem[] that contains all files that were actually copied. Then the touch task could check if that item were empty. I opted for the straightforward route since the ITaskItem[] solution isn't needed yet, and this implementation can easily be changed when we do need that.
Co-authored-by: Forgind <Forgind@users.noreply.github.com>1 parent 48ffc98 commit 02a3a62
File tree
4 files changed
+12
-1
lines changed- ref/Microsoft.Build.Tasks.Core
- netstandard
- net
- src/Tasks
4 files changed
+12
-1
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
142 | 145 | | |
143 | 146 | | |
144 | 147 | | |
| |||
298 | 301 | | |
299 | 302 | | |
300 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
301 | 307 | | |
302 | 308 | | |
303 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4696 | 4696 | | |
4697 | 4697 | | |
4698 | 4698 | | |
| 4699 | + | |
4699 | 4700 | | |
4700 | 4701 | | |
4701 | 4702 | | |
| |||
4705 | 4706 | | |
4706 | 4707 | | |
4707 | 4708 | | |
4708 | | - | |
| 4709 | + | |
4709 | 4710 | | |
4710 | 4711 | | |
4711 | 4712 | | |
| |||
0 commit comments