Unnecessary rebuilds caused because`GenerateNuSpec` writes out the file even if the contents are same
- Dominant language
- C#
- Stars
- 729
- Forks
- 397
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 149
Description
I tried this with a local build of `dotnet/runtime` on macOS, with:
`$ ./build.sh mono+libs -os Browser -c Release`
In the beginning of the build you will see a line:
`Microsoft.NET.Runtime.wasm.Sample.Mono -> /Users/radical/dev/r3/artifacts/packages/Release/Shipping/Microsoft.NET.Runtime.wasm.Sample.Mono.6.0.0-dev.nupkg`
The nuspec this used: `artifacts/packages/Release/specs/Microsoft.NET.Runtime.wasm.Sample.Mono.nuspec`
Then if I build again, then this file gets generated again, and written out, thus updating the timestamp.
The files are identical, AFAICS:
```
$ shasum /tmp/sample.nuspec
d353e675930dac28fa0d52637593e1adf066c325 /tmp/sample.nuspec
$ shasum /Users/radical/dev/r3/artifacts/packages/Release/specs/Microsoft.NET.Runtime.wasm.Sample.Mono.nuspec
d353e675930dac28fa0d52637593e1adf066c325 /Users/radical/dev/r3/artifacts/packages/Release/specs/Microsoft.NET.Runtime.wasm.Sample.Mono.nuspec
```
This causes the nupkg to get rebuilt every time, which can cascade into other things getting rebuilt.
Contributor guide
Assessment
This issue has not been assessed yet.