Add type forwards to public Abstractions types#4067
Add type forwards to public Abstractions types#4067cheenamalhotra wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds type forwarding metadata so key authentication-related types that were moved into the Microsoft.Data.SqlClient.Extensions.Abstractions assembly remain discoverable via the Microsoft.Data.SqlClient assembly, preserving backward-compat loading behavior.
Changes:
- Introduces
TypeForwards.Abstractions.cswithTypeForwardedToattributes for Abstractions authentication types. - Adds a FunctionalTests regression test that loads the moved types via the SqlClient assembly.
- Wires the new type-forward file into legacy
netfx/netcoresource projects and bothnetfx/netcoreref-assembly projects.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/tests/FunctionalTests/TypeForwardTests.cs | Adds a functional regression test for loading Abstractions-moved types via Microsoft.Data.SqlClient assembly. |
| src/Microsoft.Data.SqlClient/src/TypeForwards.Abstractions.cs | Adds assembly-level type-forward declarations for Abstractions authentication types. |
| src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj | Includes the new type-forward file in the legacy netfx build inputs. |
| src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj | Includes the new type-forward file in the netfx reference assembly build. |
| src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj | Includes the new type-forward file in the legacy netcore build inputs. |
| src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj | Includes the new type-forward file in the netcore reference assembly build. |
You can also share your feedback on Copilot code review. Take the survey.
paulmedynski
left a comment
There was a problem hiding this comment.
Looks good, with one comment, and I agree with Copilot's comments.
What scenario is this addressing? Do we support someone dropping our new DLLs into their existing app deployment and expecting things to work?
Yes, this is for backwards compatibility in applications that load types by assembly reference. |
There was a problem hiding this comment.
Pull request overview
This PR adds CLR type-forwards in Microsoft.Data.SqlClient for types that have moved into the Microsoft.Data.SqlClient.Extensions.Abstractions assembly, preserving backward compatibility for consumers that load these types from the original SqlClient assembly.
Changes:
- Add
TypeForwardedToattributes for the public Abstractions authentication types. - Wire the new type-forward source file into netfx/netcore source + reference assembly builds.
- Add a unit test ensuring the forwarded types still load via
Microsoft.Data.SqlClientand resolve to the Abstractions assembly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.Data.SqlClient/tests/UnitTests/TypeForwardTests.cs | Adds a regression test validating forwarding resolves to the Abstractions assembly. |
| src/Microsoft.Data.SqlClient/src/TypeForwards.Abstractions.cs | Introduces assembly-level type-forward declarations for Abstractions types. |
| src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj | Includes the new type-forward source in the netfx build. |
| src/Microsoft.Data.SqlClient/netfx/ref/Microsoft.Data.SqlClient.csproj | Includes the type-forward source in the netfx reference assembly build. |
| src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj | Includes the new type-forward source in the netcore build. |
| src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj | Includes the type-forward source in the netcore reference assembly build. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #4067 +/- ##
==========================================
- Coverage 75.09% 65.63% -9.46%
==========================================
Files 280 275 -5
Lines 43830 65825 +21995
==========================================
+ Hits 32914 43207 +10293
- Misses 10916 22618 +11702
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:
|
No description provided.