-
Notifications
You must be signed in to change notification settings - Fork 317
Clean up Preprocessor Directives After NET6 Removal #2938
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
Conversation
|
Looks like this includes your previous PR? |
@ErikEJ yes, this is building on the previous PR. I'll move it out of draft when the previous PR merges. |
| <TargetGroup Condition="$(TargetGroup) == ''">netcoreapp</TargetGroup> | ||
| <RuntimeIdentifier Condition="'$(TargetGroup)'=='netfx'">win</RuntimeIdentifier> | ||
| <RuntimeIdentifier Condition="'$(TargetGroup)'=='netfx' AND $(ReferenceType.Contains('Package')) AND !$(Platform.Contains('AnyCPU'))">win-$(Platform)</RuntimeIdentifier> | ||
| <DefineConstants Condition="'$(TargetGroup)'=='netfx'">$(DefineConstants);NETFRAMEWORK</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.
These constants are already provided by the sdk.
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives
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.
thank you
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2938 +/- ##
=======================================
Coverage ? 72.21%
=======================================
Files ? 291
Lines ? 59709
Branches ? 0
=======================================
Hits ? 43120
Misses ? 16589
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| #if NET8_0_OR_GREATER | ||
| #if NET |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
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.
Yeah, I'm not too particular about it - I think we're going to have fun cleaning up all this if/when we drop netfx support. Sorry if I seemed like too much of a stick in the mud about it in your PRs 😬
benrr101
left a comment
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.
Love it - it's not stomping on any of the changes I'm making, and it's good to remove these cases that are no longer necessary
| #if NET8_0_OR_GREATER | ||
| d.WriteTdsValue(data); | ||
| #else | ||
| SqlTypeWorkarounds.SqlDecimalExtractData(d, out data[0], out data[1], out data[2], out data[3]); |
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.
Can the type workarounds be removed now?
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.
A quick look says at least some of it can be removed. I'll leave it to @benrr101 because the type workarounds are split across netcore and netfx, so they'll likely be touched by the merge efforts.
|
LGTM |
Building on #2927. That PR should merge first.
This PR includes a few different types of preprocesser directive cleanups:
#if NET6_0_OR_GREATERand#if NET8_0_OR_GREATER#if NETFRAMEWORK#if NETX_0_OR_GREATER#if NETX_0_OR_GREATERwith#if NET