Skip to content

Public API | Align ref and implementation assemblies - #4832

Merged
paulmedynski merged 2 commits into
dotnet:mainfrom
edwardneal:sync-ref-implementation-api-surface
Oct 20, 2026
Merged

paulmedynski merged 2 commits into
dotnet:mainfrom
edwardneal:sync-ref-implementation-api-surface

Conversation

@edwardneal

Copy link
Copy Markdown
Contributor

Description

This provides a set of corrections to the SqlClient ref assemblies which can be reviewed prior to the updated 8.0[-preview1] release date. I've separated these fixes from the underlying ApiCompat guard in the interests of time.

Changes:

  • Added non-public constructors to various types.
  • Removed erroneously-added property setter for SqlBatchCommand.CanCreateParameter.
  • Added missing sealed modifier to various classes.
  • Added missing enum to ref assembly.
  • Added missing method to implementation assembly.

The first three of the above changes are technically source-breaking.

Issues

This relates to #4826 - apologies for pre-empting triage. This issue contains the full list of API changes.

Testing

In all cases but one, these are compile-time ref assembly changes and so aren't covered by tests. In the case of SqlParameterCollection.Add, the new netfx method passes directly through to AddWithValue and is covered by that method's test coverage.

@edwardneal
edwardneal marked this pull request as ready for review October 12, 2026 21:38
@edwardneal
edwardneal requested a review from a team as a code owner October 12, 2026 21:38
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@priyankatiwari08 priyankatiwari08 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ref/impl alignment checks out against src (TriggerAction values, ctors, sealed types, CanCreateParameter).

  • Minor: add a netfx unit test for the new Add(string, object) overload.

@github-project-automation github-project-automation Bot moved this from To triage to Waiting for customer in SqlClient Board Oct 13, 2026
@priyankatiwari08

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

paulmedynski
paulmedynski previously approved these changes Oct 13, 2026
@paulmedynski paulmedynski added this to the 8.0.0-preview1 milestone Oct 13, 2026
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.32%. Comparing base (c7ab087) to head (005e9e2).
⚠️ Report is 2 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (c7ab087) and HEAD (005e9e2). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (c7ab087) HEAD (005e9e2)
CI-SqlClient 2 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4832      +/-   ##
==========================================
- Coverage   72.40%   65.32%   -7.09%     
==========================================
  Files         292      286       -6     
  Lines       45471    68600   +23129     
==========================================
+ Hits        32924    44814   +11890     
- Misses      12547    23786   +11239     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 65.32% <ø> (?)

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

☔ View full report in Codecov by Harness.
📢 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.

@priyankatiwari08 priyankatiwari08 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good — netfx Add(string, object) test addresses my earlier comment.

@mdaigle

mdaigle commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.

@paulmedynski
paulmedynski merged commit fcf00e9 into dotnet:main Oct 20, 2026
118 of 121 checks passed
@github-project-automation github-project-automation Bot moved this from Waiting for customer to Done in SqlClient Board Oct 20, 2026
@edwardneal
edwardneal deleted the sync-ref-implementation-api-surface branch October 20, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants