-
Notifications
You must be signed in to change notification settings - Fork 743
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
feat: Add support for C# 9.0 source generators #4201
Conversation
The build 20194 found UI Test snapshots differences: Details
|
src/Directory.Build.props
Outdated
@@ -21,7 +21,7 @@ | |||
<CreateHardLinksForAdditionalFilesIfPossible>true</CreateHardLinksForAdditionalFilesIfPossible> | |||
<CreateHardLinksForPublishFilesIfPossible>true</CreateHardLinksForPublishFilesIfPossible> | |||
|
|||
<LangVersion>8.0</LangVersion> | |||
<LangVersion>preview</LangVersion> |
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.
Do we really want to merge this into ' master'?
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.
We don't ;)
src/Uno.UI/Uno.UI.Skia.csproj
Outdated
<PackageReference Include="Uno.Core.Build" /> | ||
<!--<PackageReference Include="Uno.SourceGenerationTasks" />--> |
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.
Commented stuff
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.
Not done yet :)
The build 20194 found UI Test snapshots differences: Details
|
The build 20194 found UI Test snapshots differences: Details
|
The build 20194 found UI Test snapshots differences: Details
|
The build 20194 found UI Test snapshots differences: Details
|
a3ee23a
to
7730cdd
Compare
The build 20211 found UI Test snapshots differences: Details
|
The build 20211 found UI Test snapshots differences: Details
|
The build 20211 found UI Test snapshots differences: Details
|
The build 20211 found UI Test snapshots differences: Details
|
The build 20211 found UI Test snapshots differences: Details
|
The build 20220 found UI Test snapshots differences: Details
|
52a4f04
to
725062b
Compare
The build 20221 found UI Test snapshots differences: Details
|
The build 20221 found UI Test snapshots differences: Details
|
The build 20221 found UI Test snapshots differences: Details
|
The build 20221 found UI Test snapshots differences: Details
|
725062b
to
cf4f448
Compare
The build 20225 found UI Test snapshots differences: Details
|
The build 20227 found UI Test snapshots differences: Details
|
The build 20227 found UI Test snapshots differences: Details
|
The build 20227 found UI Test snapshots differences: Details
|
182152d
to
f100d55
Compare
The build 20235 found UI Test snapshots differences: Details
|
The build 20235 found UI Test snapshots differences: Details
|
The build 20440 found UI Test snapshots differences: Details
|
be361b3
to
1349772
Compare
The build 20477 found UI Test snapshots differences: Details
|
The build 20477 found UI Test snapshots differences: Details
|
The build 20477 found UI Test snapshots differences: Details
|
The build 20477 found UI Test snapshots differences: Details
|
The build 20477 found UI Test snapshots differences: Details
|
0746982
to
a2d4bd5
Compare
The build 20536 found UI Test snapshots differences: Details
|
The build 20536 found UI Test snapshots differences: Details
|
29353ad
to
4a0d9ed
Compare
{ | ||
var telemetryOptOut = msbProject.GetProperty("UnoPlatformTelemetryOptOut")?.EvaluatedValue ?? ""; | ||
var telemetryOptOut = context.GetMSBuildPropertyValue("UnoPlatformTelemetryOptOut"); |
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.
Codacy found an issue: Remove this useless assignment to local variable 'telemetryOptOut'.
if (parametersType.GetType().GetProperty("Layout", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) is PropertyInfo info) | ||
var actualSymbol = GetActualSymbol(parametersType); | ||
|
||
if (actualSymbol.GetType().GetProperty("Layout", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) is PropertyInfo info) |
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.
Codacy found an issue: Make sure that this accessibility bypass is safe here.
context.AddSource(tree.Key, tree.Value); | ||
|
||
// Uncomment to output the generated files to a separate folder | ||
// var intermediatePath = context.GetMSBuildPropertyValue("IntermediateOutputPath"); |
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.
Codacy found an issue: Remove this commented out code.
/// <returns></returns> | ||
private object GetActualSymbol(ISymbol symbol) | ||
{ | ||
if (symbol.GetType().GetProperty("UnderlyingSymbol", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) is PropertyInfo info) |
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.
Codacy found an issue: Make sure that this accessibility bypass is safe here.
{ | ||
// Debugger.Launch(); |
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.
Codacy found an issue: Remove this commented out code.
|
||
var msBuildProjectDirectory = context.GetMSBuildPropertyValue("MSBuildProjectDirectory"); |
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.
Codacy found an issue: Remove this useless assignment to local variable 'msBuildProjectDirectory'.
// No initialization required for this one | ||
//if (!Process.GetCurrentProcess().ProcessName.Equals("devenv", StringComparison.OrdinalIgnoreCase)) | ||
{ | ||
// Debugger.Launch(); |
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.
Codacy found an issue: Remove this commented out code.
{ | ||
// Kept until dependencies can be added automatically and this is not needed anymore | ||
// | ||
// var assemblyName = typeof(DependenciesInitializer).Assembly.GetName().Name; |
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.
Codacy found an issue: Remove this commented out code.
The build 20563 found UI Test snapshots differences: Details
|
The build 20563 found UI Test snapshots differences: Details
|
GitHub Issue (If applicable): fixes #3948
PR Type
What kind of change does this PR introduce?
What is the new behavior?
Adds support for C# 9.0 source generators where available.
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):