-
Notifications
You must be signed in to change notification settings - Fork 1.9k
C#: Tracer support for invoking csc directly.
#20663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
e560ac1
6bc15bc
af5622a
def522d
d5ff9bf
e14879b
7a41408
47c751b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| category: minorAnalysis | ||
| --- | ||
| * Added tracer support for macOS and Linux when the .NET CLI (`dotnet`) directly invokes the C# compiler (`csc`). This enhancement provides basic tracing and extraction capabilities for .NET 10 RC2 on these platforms. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -226,6 +226,11 @@ function RegisterExtractorPack(id) | |
| prepend = { '--compiler', '"${compiler}"' }, | ||
| order = ORDER_BEFORE | ||
| }), | ||
| CreatePatternMatcher({ '^csc$' }, MatchCompilerName, | ||
|
||
| extractor, { | ||
| prepend = { '--compiler', '${compiler}' }, | ||
| order = ORDER_BEFORE | ||
| }), | ||
| MsBuildMatcher, | ||
| function(compilerName, compilerPath, compilerArguments, _languageId) | ||
| -- handle cases like `dotnet exec csc.dll <args>` and `mono(-sgen64) csc.exe <args>` | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
EndsWithcheck is too broad and could incorrectly match paths ending with 'csc' that aren't the compiler binary (e.g.,/path/to/misc). UsePath.GetFileNameWithoutExtension(SpecifiedCompiler) == "csc"to ensure only the actualcsccompiler binary is matched.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion - we do however need to take the file extension into account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we also need to make sure not to read the version information from a non-existing file 😄