Skip to content
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

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

am11
Copy link
Member

@am11 am11 commented Nov 5, 2024

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

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Nov 5, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

@@ -11,7 +11,6 @@
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<RunAnalyzers>false</RunAnalyzers>
<DefineConstants>TYPEEQUIVALENCEASSEMBLY_2</DefineConstants>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused

Copy link
Member

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>
Copy link
Member Author

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>
Copy link
Member Author

@am11 am11 Nov 5, 2024

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)

@akoeplinger
Copy link
Member

/ba-g One timeout in stackoverflowtester test but that wasn't touched in this PR so unrelated.

@akoeplinger akoeplinger merged commit b8816bc into dotnet:main Nov 5, 2024
138 of 142 checks passed
@am11 am11 deleted the feature/code-style-unification branch November 5, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Meta community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants