-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Unify DefineConstants #109541
Unify DefineConstants #109541
Conversation
Tagging subscribers to this area: @dotnet/area-meta |
@@ -11,7 +11,6 @@ | |||
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion> | |||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> | |||
<RunAnalyzers>false</RunAnalyzers> | |||
<DefineConstants>TYPEEQUIVALENCEASSEMBLY_2</DefineConstants> |
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.
Unused
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 same one is in src/tests/baseservices/typeequivalence/istypeequivalent/typeequivalenttypes_2.csproj, we can remove it there too
@@ -10,7 +10,6 @@ | |||
<SignAssembly>true</SignAssembly> | |||
<StrongNameKeyId>Open</StrongNameKeyId> | |||
<RunAnalyzers>false</RunAnalyzers> | |||
<DefineConstants>NETSTANDARD2_0</DefineConstants> |
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.
Redundant
@@ -3,7 +3,7 @@ | |||
<!-- Needed for CLRTestTargetUnsupported, CMakeProjectReference --> | |||
<RequiresProcessIsolation>true</RequiresProcessIsolation> | |||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | |||
<DefineConstants >WINDOWS</DefineConstants> | |||
<DefineConstants>$(DefineConstants);WINDOWS</DefineConstants> |
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.
Note: this is not redundant. WINDOWS
is only defined when OS-specific TFM is used https://learn.microsoft.com/dotnet/standard/frameworks#preprocessor-symbols (net9.0
vs. net9.0-windows
)
/ba-g One timeout in stackoverflowtester test but that wasn't touched in this PR so unrelated. |
A followup on #109539 where it seems unintentional to not capture contextual constants. Also removed unused and redundant ones.
Query:
$ git grep -B1 -P '<DefineConstants(?![^<]*\$\(\s*DefineConstants\s*\))[^<]*</DefineConstants>(?!.*DefineConstants)'
cc @akoeplinger, @ilonatommy