Skip to content

[BuildCheck] Implement double writes analyzer#10184

Merged
ladipro merged 9 commits intodotnet:mainfrom
ladipro:9881-double-writes
Jun 10, 2024
Merged

[BuildCheck] Implement double writes analyzer#10184
ladipro merged 9 commits intodotnet:mainfrom
ladipro:9881-double-writes

Conversation

@ladipro
Copy link
Copy Markdown
Member

@ladipro ladipro commented May 28, 2024

Fixes #9881

Context

We believe there is value in flagging cases where the same file is written by more than one task during a build. dotnet/source-build#4390 is an example of a recent hard-to-diagnose build issue that could have been prevented by this analyzer.

Changes Made

This PR adds a new built-in analyzer and makes a few supporting changes.

Testing

  • Existing and new unit tests.
  • Built a few larger repos with the analyzer enabled.

Notes

The changes contain a fix/workaround for #10176.

@ladipro ladipro force-pushed the 9881-double-writes branch from 9b8cf13 to bd77da3 Compare May 29, 2024 07:33
@ladipro ladipro marked this pull request as ready for review May 29, 2024 07:40
@ladipro ladipro requested a review from JanKrivanek May 29, 2024 07:40
Copy link
Copy Markdown
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I did just a first quick pass - but overall looks good.
I'll do more in depth review early next week

Copy link
Copy Markdown
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks very good!

The only reason I'm requesting changes is the rooting of the path in the AnalyzeWrite.

Copy link
Copy Markdown
Member

@JanKrivanek JanKrivanek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Awesome work!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Built-in analyzer] The same file is written by multiple tasks during the build

3 participants