-
Notifications
You must be signed in to change notification settings - Fork 321
Merge | OS Flags #3810
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
Merge | OS Flags #3810
Conversation
…o methods that had separate implementations were identical...
…partial. This file is too big to come up with a consistent way to split all this stuff up.
…c class. Cleaned up some code (removed redundant parentheses, split some long lines, removed always-false variables)
…ssionHandle.netfx. This really makes these classes easier to read.
… add comment explaining why this file exists.
…indicate that it only applies to Windows.
…ogical paths match the actual path
…ogical paths match the actual path
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.
Pull request overview
Copilot reviewed 81 out of 83 changed files in this pull request and generated no new comments.
…at are platform specific in Fix case-sensitivity issues in netfx project
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.
Pull request overview
Copilot reviewed 83 out of 85 changed files in this pull request and generated no new comments.
src/Microsoft.Data.SqlClient/tests/Common/LocalAppContextSwitchesHelper.cs
Show resolved
Hide resolved
…on netfx project, remove explicit NETFRAMEWORK definition in netfx b/c the sdk does it.
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.
Pull request overview
Copilot reviewed 89 out of 91 changed files in this pull request and generated no new comments.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3810 +/- ##
===========================================
- Coverage 90.82% 69.87% -20.95%
===========================================
Files 6 265 +259
Lines 316 66407 +66091
===========================================
+ Hits 287 46403 +46116
- Misses 29 20004 +19975
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Introduced _WINDOWS/_UNIX compile-time constants and TargetOs selection in src/Microsoft.Data.SqlClient/src/Microsoft.Data.SqlClient.csproj, plus mirrored updates to netcore/src/Microsoft.Data.SqlClient.csproj and netfx/src/Microsoft.Data.SqlClient.csproj so OS-gated code can be compiled from the common project and Windows-only ILLink substitutions are conditionally embedded (Resources/ILLink.Substitutions.xml).
Normalized OS-specific sources to .windows/.unix naming and wired them into the new flags (e.g., LocalDbApi., LocalDB.netcore., PacketHandle., SessionHandle., SqlFileStream., SqlColumnEncryption, TdsParser*, SNI interop files), with new netfx-specific shims like PacketHandle.netfx.cs and SessionHandle.netfx.cs. Refactored shared helpers into OS- and target-aware partials: AdapterUtil.cs now delegates netfx- and netcore-specific pieces to AdapterUtil.netfx.cs/AdapterUtil.netcore.cs; DbConnectionPoolIdentity.cs and SqlDataSourceEnumerator.cs now pick managed vs native implementations based on _WINDOWS/_UNIX and LocalAppContextSwitches.UseManagedNetworking; added netfx-only System/Diagnostics/CodeAnalysis.netfx.cs.
Folded the netcore app–specific SSL over TDS stream logic into ManagedSni/SslOverTdsStream.netcore.cs, adding span-based sync/async read handling and packet encapsulation directly in the shared file.
Tidied LocalAppContextSwitches.cs for clearer NET vs NETFRAMEWORK behavior (globalization invariant handling and managed SNI defaults) under the new OS constants.
[The above is AI generated]
Issues
Continuation of work from #1261
Testing
Projects still build, and the common project is building too 👀