Skip to content

fix out of proc buildCheck invocation#10496

Merged
YuliiaKovalova merged 4 commits intodotnet:mainfrom
YuliiaKovalova:dev/ykovalova/fix_outOfProc_buildCheck_execution
Aug 8, 2024
Merged

fix out of proc buildCheck invocation#10496
YuliiaKovalova merged 4 commits intodotnet:mainfrom
YuliiaKovalova:dev/ykovalova/fix_outOfProc_buildCheck_execution

Conversation

@YuliiaKovalova
Copy link
Copy Markdown
Member

@YuliiaKovalova YuliiaKovalova commented Aug 7, 2024

Fixes #10176

Context

When BuildCheck was run in scope of out of pross execution, using BuildContext form the event was causing error "ContextID {0} should have been in the ID-to-project file mapping but wasn't!".

Changes Made

Jan's assumption was correct here:
#10176 (comment)
LoggingService on the receiving side doesn't have _projectFileMap populated, so on the attempt to read from it, exception was thrown.

On existing customization in ProjectStartedEventArgs handling we already have ContextID and ProjectFile to fill _projectFileMap if it's out of proc environment. When a BuildCheck event pops up, it's gracefully handled .

Testing

The existing test was covering this gap

[InlineData(true, true)]

Once I removed workaround bff8a4e, it failed.

@YuliiaKovalova YuliiaKovalova marked this pull request as ready for review August 7, 2024 17:05
@YuliiaKovalova YuliiaKovalova changed the title fix out of proc buildCheck fix out of proc buildCheck invocation Aug 7, 2024
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.

Looks great!

@YuliiaKovalova YuliiaKovalova merged commit 2f39510 into dotnet:main Aug 8, 2024
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.

[Bug]: BuildCheck: Internal error thrown when reporting results

3 participants