Merge pull request #20933 from michaelnebel/csharp/runtraceraftercompilation

C#: Invoke the extractor after the compiler to ensure that source generators have been executed.
This commit is contained in:
Michael Nebel
2025-12-04 13:41:38 +01:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -0,0 +1,4 @@
---
category: fix
---
* Fixed an issue where compiler-generated files were not being extracted. The extractor now runs after compilation completes to ensure all generated files are properly analyzed.

View File

@@ -183,7 +183,7 @@ function RegisterExtractorPack(id)
MsBuildMatcher,
CreatePatternMatcher({ '^csc.*%.exe$' }, MatchCompilerName, extractor, {
prepend = { '--compiler', '"${compiler}"' },
order = ORDER_BEFORE
order = ORDER_AFTER
}),
CreatePatternMatcher({ '^fakes.*%.exe$', 'moles.*%.exe' },
MatchCompilerName, nil, { trace = false }),
@@ -224,7 +224,7 @@ function RegisterExtractorPack(id)
CreatePatternMatcher({ '^mcs%.exe$', '^csc%.exe$', '^csc$' }, MatchCompilerName,
extractor, {
prepend = { '--compiler', '${compiler}' },
order = ORDER_BEFORE
order = ORDER_AFTER
}),
MsBuildMatcher,
function(compilerName, compilerPath, compilerArguments, _languageId)