Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Merge | Netfx SMI Classes#3326

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
benrr101 merged 12 commits intomainfromdev/russellben/merge/netfx-smi
May 12, 2025
Merged

Conversation

benrr101
Copy link
Contributor

Description: This PR is a bit bigger than usual, but it's mostly cut/paste of classes from the netfx project to the common project. There are a few additional changes going on in this PR though that are worth calling out:

  • Some light cleanup ofSmiContextFactory to just make sure it's following some style guidelines
  • MakingSmiEventStream.Dispose obsolete (since it is notated to be obsolete and only throws)
  • Removing majority of the code in SmiRequestExecutor since it is notated as obsolete and should have never been used.
    • This class is weird - it abstract and used inSqlCommand, but there are no classes that inherit from it. All the virtual code paths overridden in it throw, so any codepath that uses it will always throw. I suspect it is ultimately not used. I will investigate if this entire codepath can be deleted.
  • TriggerAction enum definitions derive directly fromEMDEventType enum definitions, which seems completely pointless to me. So, I rolled theEMDEventType values into theTriggerAction enum and deletedEMDEventType.
  • The twoSmiXetterAccessMap classes were combined together with#if NETFRAMEWORK.
  • RenamedSmiEventSink_DeferedProcessing toSmiEventSink_DeferredProcessing (typo in Deferred)

Testing: Project builds locally, will wait for CI to call it good.

@benrr101benrr101 added the Common Project 🚮Things that relate to the common project project labelMay 2, 2025
@benrr101benrr101 added this to the6.1-preview2 milestoneMay 2, 2025
@benrr101benrr101 requested a review froma teamMay 2, 2025 18:40
@codecovCodecov
Copy link

codecovbot commentedMay 2, 2025
edited
Loading

Codecov Report

Attention: Patch coverage is0.93458% with106 lines in your changes missing coverage. Please review.

Project coverage is 65.10%. Comparing base(965e5ff) to head(1b1ca6c).
Report is 13 commits behind head on main.

Files with missing linesPatch %Lines
...rosoft/Data/SqlClient/Server/SmiXetterAccessMap.cs0.00%86 Missing⚠️
...t/Data/SqlClient/Server/SmiContextFactory.netfx.cs11.11%8 Missing⚠️
.../Data/SqlClient/Server/SmiRequestExecutor.netfx.cs0.00%5 Missing⚠️
...osoft/Data/SqlClient/Server/SmiConnection.netfx.cs0.00%4 Missing⚠️
...t/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs0.00%1 Missing⚠️
...nt/Server/SmiEventSink_DeferredProcessing.netfx.cs0.00%1 Missing⚠️
...soft/Data/SqlClient/Server/SmiEventStream.netfx.cs0.00%1 Missing⚠️
Additional details and impacted files
@@            Coverage Diff             @@##             main    #3326      +/-   ##==========================================- Coverage   67.74%   65.10%   -2.64%==========================================  Files         298      298                Lines       65536    65469      -67     ==========================================- Hits        44397    42624    -1773- Misses      21139    22845    +1706
FlagCoverage Δ
addons92.58% <ø> (ø)
netcore68.37% <0.00%> (-3.78%)⬇️
netfx66.24% <0.93%> (+0.08%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@edwardneal
Copy link
Contributor

I'm pretty sure that everything here will be deleted when the context connection PR set (#2996 and its follow-ups) is finished. Every path here is already unused because we block context connections in the connection string. Do you still want to merge the files?

I completely agree with removing the event sink code from SqlCommand. I think the original SQLCLR methodology had a set of custom event sinks and a custom SmiLink derivative in the SqlAccess assembly, so it's used to support that.

@benrr101
Copy link
ContributorAuthor

I'm pretty sure that everything here will be deleted when the context connection PR set (#2996 and its follow-ups) is finished. Every path here is already unused because we block context connections in the connection string. Do you still want to merge the files?

I completely agree with removing the event sink code from SqlCommand. I think the original SQLCLR methodology had a set of custom event sinks and a custom SmiLink derivative in the SqlAccess assembly, so it's used to support that.

nooooooooooooooooooooooooooooooooooooooooooooooooooooooo 😭
Ijust "discovered" that almost all of the context connection code can be obliterated. And i was really excited to blow it all up☹️ However, I'm not super sure about all of it being exploded. There's some code paths that are moved in this PR that I can't confidently say are not being used (eg, abstract classes that are never inherited from, but they are still being referenced in a way I can't safely say is never called). I mean for my own satisfaction/ego, I'd like to do the merge and then pare it away in future PRs. But I also want to be nice to our wonderful contributors and let them get the glory when they deserve it.

edwardneal reacted with laugh emoji

// SqlDbTypes as rows
// bool, byte, bytes, chars, strng, int16, int32, int64, singl, doubl, sqldec, date, guid, varmd, Xetr, time, dtost
/*BigInt*/ { _, _, _, _, _, _, _, X, _, _, _, _, _, _, _, _, _, },
/*Binary*/ { _, _, X, _, _, _, _, _, _, _, _, _, _, _, _, _, _, },
Copy link
Contributor

Choose a reason for hiding this comment

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

This is some crazy stuff 😟

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

What's crazier - a lot of this is just going to disappear in a later PR :)

@@ -405,7 +405,7 @@ internal override void ParameterAvailable(SmiParameterMetaData metaData, SmiType

private SmiContext _smiRequestContext; // context that _smiRequest came from
private CommandEventSink _smiEventSink;
privateSmiEventSink_DeferedProcessing _outParamEventSink;
privateSmiEventSink_DeferredProcessing _outParamEventSink;
Copy link
Contributor

Choose a reason for hiding this comment

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

Heh, I changed this on another branch of mine as well. Shouldn't conflict.

/// <summary>
/// Formal encoding of SMI's metadata-to-ITypedSetter/-from-ITypedGetter validity rules
/// </summary>
internal partial class SmiXetterAccessMap
Copy link
Contributor

Choose a reason for hiding this comment

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

What's a Xetter?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Afaik it's [G|S]etter - so this has both getters and setters

@benrr101benrr101 merged commitb3a72fc intomainMay 12, 2025
251 checks passed
@benrr101benrr101 deleted the dev/russellben/merge/netfx-smi branchMay 12, 2025 22:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mdaiglemdaiglemdaigle approved these changes

@paulmedynskipaulmedynskipaulmedynski approved these changes

Assignees
No one assigned
Labels
Common Project 🚮Things that relate to the common project project
Projects
None yet
Milestone
6.1-preview2
Development

Successfully merging this pull request may close these issues.

4 participants
@benrr101@edwardneal@mdaigle@paulmedynski

[8]ページ先頭

©2009-2025 Movatter.jp