You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#2839 also has an impact on this, because removal of SQL 7.0/2000 code means a lot less #IF NETFRAMEWORK constructs, so holding off with aliging SQL7.0/2000 specific code until we know if it needs to stay or can be removed
#3042 Also removes some code that is no longer necessary to merge then
Thanks for this @MichelZ - these bundles of changes look good to me.
Another pattern of changes will also need to be made at some point, across TdsParser and other core parts of SqlClient: Constrained Execution Region support exists in netfx, but was removed in netcore. This is (roughly) a no-op, but each instance adds ~45 lines to the diff and it's usually inside methods which are otherwise identical. It's probably not necessary as part of this cleanup, but it'd be a good idea to port the CER support to netcore before starting to merge identical methods.
On a wider point: I think it makes sense to use the TdsParser approach as a template for the core parts of SqlClient.
I think that's it for now with the more trivial stuff. Once these are merged I'll continue with some more "meaty" one's :)
I do hope these are mostly straight forward to review and don't take up too much of anyone's time.
Thanks for taking a stab at merging this behemoth of a class 👍 I'll do my best to look at these PRs in a timely manner, but keep in mind we need two signoffs on them to get them merged. I'll also do my best to encourage my teammates to look at your PRs as well 😅
That being said, I think for the smaller changes, it might be more beneficial to combine a couple together - eg, comments and comment typos could be rolled into a single comment PR. I've been trying to structure my PRs such that each commit is a complete item. So, eg, if you had a PR for comments, one commit could be getting the blocks aligned, the second could be to fix the typos. You don't need to go back recall the PRs that are currently out, but it might be beneficial going forward. It's a delicate balance between too much overhead per PR and too much to review in a single PR.
My strategy for merging classes has been to create a "merge file" in the commit history of the PR. Basically indicate what blocks of code are from only one side of the merge. Then, merge work through each chunk of conflicts to either resolve as one or the other (eg, Int32 vs int) or leave with an #if NETFRAMEWORK sort of thing.
Where possible, port guid, integer, float, double, decimal, SqlGuid, SqlBinary parsing/writing from netcore to netfx
Port lambda expression allocation improvements from netcore to netfx
Complex
Decide what to do with Transparent Network IP Resolution. netfx supports this, netcore doesn't
Port public interface of TdsParserStateObject
When processing ALTMETADATA, if a null/empty column name is supplied then netfx tries to synthesise it from the operand. Verify this - it might just be an artefact of SQL Server 2000, since netcore works without it
netfx throws an exception when trying to add a UDT parameter with a negative length, netcore does not. This needs a behaviour change (and cross-reference to the TDS specification to check for possible special meanings.)
When tracing is enabled, netfx will include a Trace Activity header with every SQL command. Decide if we want this functionality - and if we want to control it in this manner
I'll work through these as I can, unless anyone else gets to them first.
Activity
Align newlines between netfx and netcore dotnet#2953
edwardneal commentedon Nov 2, 2024
Thanks for this @MichelZ - these bundles of changes look good to me.
Another pattern of changes will also need to be made at some point, across TdsParser and other core parts of SqlClient: Constrained Execution Region support exists in netfx, but was removed in netcore. This is (roughly) a no-op, but each instance adds ~45 lines to the diff and it's usually inside methods which are otherwise identical. It's probably not necessary as part of this cleanup, but it'd be a good idea to port the CER support to netcore before starting to merge identical methods.
On a wider point: I think it makes sense to use the TdsParser approach as a template for the core parts of SqlClient.
MichelZ commentedon Nov 2, 2024
I think that's it for now with the more trivial stuff. Once these are merged I'll continue with some more "meaty" one's :)
I do hope these are mostly straight forward to review and don't take up too much of anyone's time.
benrr101 commentedon Nov 4, 2024
Thanks for taking a stab at merging this behemoth of a class 👍 I'll do my best to look at these PRs in a timely manner, but keep in mind we need two signoffs on them to get them merged. I'll also do my best to encourage my teammates to look at your PRs as well 😅
That being said, I think for the smaller changes, it might be more beneficial to combine a couple together - eg, comments and comment typos could be rolled into a single comment PR. I've been trying to structure my PRs such that each commit is a complete item. So, eg, if you had a PR for comments, one commit could be getting the blocks aligned, the second could be to fix the typos. You don't need to go back recall the PRs that are currently out, but it might be beneficial going forward. It's a delicate balance between too much overhead per PR and too much to review in a single PR.
My strategy for merging classes has been to create a "merge file" in the commit history of the PR. Basically indicate what blocks of code are from only one side of the merge. Then, merge work through each chunk of conflicts to either resolve as one or the other (eg, Int32 vs int) or leave with an
#if NETFRAMEWORKsort of thing.Align newlines between netfx and netcore #2953 (#2954)
edwardneal commentedon May 1, 2025
At the moment, TdsParser has a diff of -550/+430. The tasks I'd identified to finish this merge are:
Trivial
Functionality ports
Complex
I'll work through these as I can, unless anyone else gets to them first.