Fix IdeCore benchmark build isolation - #84668
Merged
dibarbet merged 3 commits intoJul 29, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce0cecc4-ebad-4080-898f-e63b5ecde88d
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce0cecc4-ebad-4080-898f-e63b5ecde88d
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce0cecc4-ebad-4080-898f-e63b5ecde88d
|
Azure Pipelines: Successfully started running 2 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the benchmark validation story for IdeCoreBenchmarks by isolating BenchmarkDotNet’s build output properties from Roslyn’s project-reference graph, and by making benchmark runs fail the process when BenchmarkDotNet reports failures (so CI can reliably detect them).
Changes:
- Updates
IdeCoreBenchmarksrunner startup to strip BenchmarkDotNet output-related MSBuild properties from project references and return a nonzero exit code on validation/build/execution failures. - Re-enables
IdeCoreBenchmarksineng/validate-benchmarks.ps1using a bounded CI filter intended to exercise runner generation/build without running the whole suite. - Improves CI argument construction to support per-project
--filterwhile keeping it as a single PowerShell argument.
Show a summary per file
| File | Description |
|---|---|
| src/Tools/IdeCoreBenchmarks/Program.cs | Sets MSBuild global-properties removal env var to avoid cross-target output collisions; returns process exit code based on BenchmarkDotNet summaries. |
| eng/validate-benchmarks.ps1 | Re-adds IdeCoreBenchmarks dry validation with a representative filter; allows per-entry CI filters. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 1
Comment on lines
+58
to
+63
| var summaries = new BenchmarkSwitcher(typeof(Program).Assembly).Run(args); | ||
| return summaries.Any(summary => | ||
| summary.HasCriticalValidationErrors || | ||
| summary.Reports.Any(report => !report.BuildResult.IsBuildSuccess || !report.AllMeasurements.Any())) | ||
| ? 1 | ||
| : 0; |
akhera99
approved these changes
Jul 29, 2026
jaredpar
pushed a commit
to jaredpar/roslyn
that referenced
this pull request
Jul 30, 2026
## Summary - prevent BenchmarkDotNet runner output properties from flowing into the Roslyn project-reference graph - return a nonzero exit code when BenchmarkDotNet reports build, validation, or execution failures - re-enable IdeCoreBenchmarks validation with a representative bounded Dry run ## Test plan - `dotnet build src\Tools\IdeCoreBenchmarks\IdeCoreBenchmarks.csproj -c Release -f net10.0 --no-restore --disable-build-servers` - `dotnet run --project src\Tools\IdeCoreBenchmarks\IdeCoreBenchmarks.csproj -c Release -f net10.0 --no-build --disable-build-servers -- --job Dry --filter=*SegmentedArrayBenchmarks_Indexer*` ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/dotnet/roslyn/pull/84668) --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ce0cecc4-ebad-4080-898f-e63b5ecde88d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
dotnet build src\Tools\IdeCoreBenchmarks\IdeCoreBenchmarks.csproj -c Release -f net10.0 --no-restore --disable-build-serversdotnet run --project src\Tools\IdeCoreBenchmarks\IdeCoreBenchmarks.csproj -c Release -f net10.0 --no-build --disable-build-servers -- --job Dry --filter=*SegmentedArrayBenchmarks_Indexer*Microsoft Reviewers: Open in CodeFlow