MSBuildStructuredLog icon indicating copy to clipboard operation
MSBuildStructuredLog copied to clipboard

Double-write not detected when two Cscs write to the same output .dll simultaneously

Open KirillOsenkov opened this issue 1 year ago • 1 comments

https://github.com/KirillOsenkov/MSBuildStructuredLog/blob/b56ebfb2caea11a3ffad279aa25ddd0f67a115da/src/StructuredLogger/Analyzers/DoubleWritesAnalyzer.cs#L72,L96

https://github.com/dotnet/roslyn/pull/73468#issuecomment-2110626616

https://artprodcus3.artifacts.visualstudio.com/A6fcc92e5-73a7-4f88-8d13-d9045b45fb27/cbb18261-c48f-4abb-8651-8cdcb5474649/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2RuY2VuZy1wdWJsaWMvcHJvamVjdElkL2NiYjE4MjYxLWM0OGYtNGFiYi04NjUxLThjZGNiNTQ3NDY0OS9idWlsZElkLzY2OTI1NS9hcnRpZmFjdE5hbWUvV2luZG93c194NjRfQnVpbGRMb2dzX0F0dGVtcHQx0/content?format=zip

https://github.com/dotnet/source-build/issues/4390#issuecomment-2104558290

https://github.com/dotnet/source-build/issues/4390#issuecomment-2104957177

Two Cscs writing to the same output is not detected as a double-write because the source file is considered the same assembly. The "source" should be ephemeral - it's immaterial where these writes come from as long as the destination is the same.

KirillOsenkov avatar May 14 '24 19:05 KirillOsenkov

FYI @ladipro

JanKrivanek avatar May 15 '24 11:05 JanKrivanek