Skip to content

net11 measurements: EF Core 11 under the 5.x differ (record for SchemaKit, not merged) - #47

Draft
CaffeinatedCoder wants to merge 3 commits into
mainfrom
net11
Draft

CaffeinatedCoder wants to merge 3 commits into
mainfrom
net11

Conversation

@CaffeinatedCoder

@CaffeinatedCoder CaffeinatedCoder commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Closes CaffeinatedCoder/CodoMetis.EFCore.SchemaKit#2

Plan changed 2026-10-19 (#37, #41, CaffeinatedCoder/CodoMetis.EFCore.SchemaKit#11). The package is spun off as CodoMetis.EFCore.SchemaKit at 11.0.0 with an entirely new API (#61), and no preview ships the 5.x API under the new ids. This draft will not be merged or published as it is.

It stays open as the record of the EF Core 11 measurements below: the differ, its registration and the snapshot generator need no source change on EF Core 11. The new kernel (#38) relies on that.

  • Npgsql's rc.2 is on NuGet now, which settles decision 1 below.
  • Decision 3 is moot: the new ids have no baseline (#46).

Close it when CaffeinatedCoder/CodoMetis.EFCore.SchemaKit#2 lands.

Problem

EF Core 11 targets net11.0 only, and this package's differs subclass EF internals behind EF1001, so EF Core 11 is where it breaks first. Issue CaffeinatedCoder/CodoMetis.EFCore.SchemaKit#2 asks for the retarget on its own branch, measured before anything is changed, with the public surface identical to the last 10-line release.

Change

  • net11.0 in the three shipping projects and the test project; Version 11.0.0-preview.1; PackageValidationBaselineVersion 5.4.1 (the release before this one, as PackagingConventionTests requires).
  • Floors: Microsoft.EntityFrameworkCore.Abstractions and .SqlServer [11.0.0-rc.1.26425.128, 12.0.0), Npgsql.EntityFrameworkCore.PostgreSQL [11.0.0-rc.1.1, 12.0.0), Microsoft.EntityFrameworkCore.Design rc.1 (build-only, unchanged PrivateAssets=all). Not rc.2, and not [11.0.0, 12.0.0) — see decisions 1 and 2.
  • global.json pins 11.0.100-rc.2.26504.105 with rollForward: latestFeature and allowPrerelease; Homebrew's dotnet 10 now refuses the branch (Install the [11.0.100-rc.2.26504.105] .NET SDK or update global.json) instead of building it wrong.
  • .github/workflows/dotnet.yml: dotnet-version: 11.0.x + dotnet-quality: preview in all four jobs. Nothing else in the workflow moves (#43). The SBOM tool (cyclonedx 6.2.0, net10.0) has rollForward: Major in its runtimeconfig, so it runs on the 11 runtime.
  • test/consumer-smoke-test.sh: consumer on net11.0; the consumer's Microsoft.EntityFrameworkCore.Design and the dotnet-ef tool pinned to the EF version read from the core csproj (decision 1 is a consumer's problem too: --prerelease picked Design rc.2 and failed with NU1107).
  • One CompatibilitySuppressions.xml per package suppressing PKV006 for net10.0 — the documented route in Directory.Build.props for a deliberate break (decision 3).
  • Changelog sections for 11.0.0-preview.1 (root and the three packages), as ChangelogConsistencyTests requires for the shipped version.
  • The three repository-convention tests that parse the version now read a prerelease (SemanticVersion in the harness) — System.Version threw FormatException on 11.0.0-preview.1. Separate commit.
  • No source change under src/ beyond the csproj files and the core package Description. No doc under docs/ or README names EF Core 10, so none changed.

Tests

Measured before changing (EF Core 11 rc.1, .NET 11 RC2 SDK)

Item Result
Restore with EF rc.2 NU1107: EFCore.ComplexIndexes.PostgreSQL -> Npgsql.EntityFrameworkCore.PostgreSQL 11.0.0-rc.1.1 -> Microsoft.EntityFrameworkCore (= 11.0.0-rc.1.26425.128) against Design rc.2 -> Relational rc.2 -> EF (>= rc.2). Same in the test project via the SqlServer provider.
Build on EF rc.1, no source change 0 Error(s). The differ constructor keeps five parameters on release/11.0 (ROADMAP.md, corrected 2026-09-22); IEntityType.FindIndex widening is source-compatible. No #if needed.
Full suite, first run, no source change 334 passed, 5 failed — all five are convention tests throwing System.FormatException: The input string '11.0.0-preview.1' was not in a correct format, plus the security-policy horizon assertion (SECURITY.md says the current line targets EF Core 10, but the core project's EF Core floor is 11). No behaviour test failed.
Full suite after the convention-test change 339 passed, 0 failed, CI=true so an unreachable container would have failed rather than skipped.
Design-time and runtime differ registration DesignTimeServiceRegistrationTests 6/6, RuntimeRegistrationTests 7/7.
EnsureCreated, GenerateCreateScript, pending-changes check PendingModelChangesTests 5/5, RuntimeRegistrationTests (EnsureCreated / create script) pass.
Snapshot annotation format round-trips SnapshotRoundTripTests 8/8 — a real generated snapshot compiled with Roslyn under EF 11's refactored CSharpSnapshotGenerator, diffed back with no churn.
Generator-rendered SQL byte-identical to main Every SQL expectation in the suite (Npgsql*SqlTests, NpgsqlJsonMemberRenderingTests 15/15 against EF's own ToQueryString(), SqlServerDifferTests, exclusion/temporal) is unchanged on this branch and passes. PostgresIntegrationTests 9/9 on a PostgreSQL 18 container.
PostgreSQL 16 Not run. The suite has one container image (postgres:18, hard-coded); a 16 leg is CaffeinatedCoder/CodoMetis.EFCore.SchemaKit#5's matrix work.
SQL Server Not run against a database. The suite has no SQL Server container; the SQL Server differ is covered by its unit tests and the smoke test's scaffold + rejection.
Consumer smoke test, both modes Self-packed feed (the consumer job's mode) and pre-built feed (the pack job's mode): every assertion ok for both satellites, including the exclusion constraint that pins the Npgsql differ, the clustered-index rejection that pins the SQL Server differ, and no churn on a second migrations add.

Public surface

Standalone apicompat (Microsoft.DotNet.ApiCompat.Tool), --left the 5.4.1 lib/net10.0 assembly from the restored baseline package, --right the net11.0 Release build:

Package Result
EFCore.ComplexIndexes no breaking changes
EFCore.ComplexIndexes.PostgreSQL no breaking changes
EFCore.ComplexIndexes.SqlServer no breaking changes

EF 11 forced no signature change.

Verify-the-guard

  • dotnet pack with the PKV006 suppression in place, after making CustomMigrationsModelDiffer.RuntimeWiringSentinel internal: packed successfully. Package validation is blind across the framework drop (it only pairs frameworks the new package still serves).
  • The standalone apicompat on the same build: CP0002: EFCore.ComplexIndexes.CustomMigrationsModelDiffer.RuntimeWiringSentinel exists on the left but not on the right. The check is possible, just not through dotnet pack — hence Package validation on the SchemaKit line: no baseline until 11.0.0 CodoMetis.EFCore.SchemaKit#6.
  • Reverted; the committed differ is byte-identical to main.

Decisions for the maintainer

  1. EF rc.1, not rc.2. Npgsql's prerelease pins Microsoft.EntityFrameworkCore exactly, so the whole solution and every consumer sit on the RC Npgsql was built against. Bumping to rc.2 is a one-line change in each csproj the day Npgsql.EntityFrameworkCore.PostgreSQL 11.0.0-rc.2 is on NuGet. The SDK is RC2 regardless.
  2. Floor [11.0.0-rc.1.26425.128, 12.0.0), not [11.0.0, 12.0.0). NuGet orders prerelease below release, so [11.0.0, …) excludes every RC and cannot restore today. The floor moves to 11.0.0 at EF Core 11 GA.
  3. Package validation is blind until an 11-line release is the baseline (#46, options listed there). The surface was proven identical by hand; the Directory.Build.props comment says so.
  4. SecurityPolicyConsistencyTests on a prerelease. SECURITY.md is Adopt the ValueRanges tracking culture: issue forms, PR template, hygiene workflow, CONTRIBUTING labels and branches, SECURITY rows #40's (not touched here). On a prerelease the test now checks the table against the newest released version in the changelog (5.4) and lets the horizon sentence name the EF major before the targeted one, since that is the line receiving fixes. Once Adopt the ValueRanges tracking culture: issue forms, PR template, hygiene workflow, CONTRIBUTING labels and branches, SECURITY rows #40 lands with two supported rows and merges forward, its version of the test wins; expect a small conflict in that file.
  5. release.yml still installs SDK 10.0.x. Left alone on purpose (this PR touches dotnet.yml only; the publish path is CI lanes: PostgreSQL 16 and 18, SQL Server 2022, and a prerelease path in the release workflow CodoMetis.EFCore.SchemaKit#5's). A tag on this branch would fail at restore, loudly, not publish something wrong.

Follow-ups

🤖 Generated with Claude Code

CaffeinatedCoder and others added 2 commits October 18, 2026 13:54
…ests

The changelog, packaging and security-policy convention tests parsed every version with
System.Version, which rejects a prerelease suffix, so the first preview of a new line crashed
all five with a FormatException instead of a finding. A SemanticVersion record in the harness
parses "11.0.0-preview.1", orders as SemVer 2.0 §11 (and NuGet) does, and recognises the
changelog heading with an optional suffix — still the literal "## <version>" release.yml
extracts the notes with.

SECURITY.md describes released lines. While a prerelease is being built, the supported-versions
row is checked against the newest version the changelog documents without a suffix, and the
support-horizon sentence may still name the EF Core major before the one the preview targets,
since that is the line receiving fixes. A released version is checked as before.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
The 11 line, as decided on 2026-10-18: one line per EF Core major, this branch carrying only
the retarget and merging main forward. net11.0 in the three shipping projects and the tests;
Microsoft.EntityFrameworkCore.* 11.0.0-rc.1.26425.128 with the floor
[11.0.0-rc.1.26425.128, 12.0.0); Npgsql.EntityFrameworkCore.PostgreSQL [11.0.0-rc.1.1, 12.0.0).
Not rc.2: Npgsql's prerelease pins Microsoft.EntityFrameworkCore to exactly rc.1, so EF rc.2
fails to restore next to it (NU1107) in the PostgreSQL satellite, the tests and any consumer.

global.json pins the 11.0.100-rc.2 SDK (latestFeature, allowPrerelease), so an SDK 10 refuses
the branch instead of building it wrong. No source change was needed: the differs compile and
all 339 tests pass unchanged, the integration suite on PostgreSQL 18 included.

Package validation: the 5.4.1 baseline ships net10.0 and this ships net11.0 only, so the
baseline validator reports PKV006 and pairs no frameworks. Suppressed per package through the
documented CompatibilitySuppressions.xml route; the surface was compared with the standalone
apicompat tool instead (no change in any of the three assemblies). Issue #46 tracks restoring
the guard. The baseline moves to 5.4.1, the release before this one.

The consumer smoke test pins the consumer's Design package and the dotnet-ef tool to the EF
version the packages build against, read from the core csproj, because a consumer one RC
ahead of the provider hits the same NU1107. CI installs the .NET 11 preview SDK in every job.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder added this to the 11.0.0 milestone Oct 18, 2026
@CaffeinatedCoder CaffeinatedCoder added chore Build, CI, packaging, refactoring with no behaviour change package/core Affects EFCore.ComplexIndexes package/postgresql Affects EFCore.ComplexIndexes.PostgreSQL package/sqlserver Affects EFCore.ComplexIndexes.SqlServer area/migrations The differs, snapshot format, EnsureCreated and design-time wiring labels Oct 18, 2026
Brings in #45 (tracking culture, two supported lines), #48 (Latest handling) and #53
(Dependabot build-only pins).

Conflicts: ChangelogConsistencyTests, PackagingConventionTests and
SecurityPolicyConsistencyTests, all resolved to main. 2085324 added a SemanticVersion
harness type here so the convention tests could read 11.0.0-preview.1; #45 solved the
same problem on main with ReleaseVersion (prerelease parsing, SemVer precedence, the
"## <version>" heading with a suffix) and made the security-policy checks aware of two
lines. SemanticVersion is unused after the merge and is removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@CaffeinatedCoder CaffeinatedCoder changed the title net11: retarget to EF Core 11 RC2 (11.0.0-preview.1) — do not merge before v10.0.0 SchemaKit 11.0.0-preview.1, retarget half: EF Core 11 under net11.0 (replayed on main after the release/5.x cut) Oct 19, 2026
@CaffeinatedCoder CaffeinatedCoder changed the title SchemaKit 11.0.0-preview.1, retarget half: EF Core 11 under net11.0 (replayed on main after the release/5.x cut) net11 measurements: EF Core 11 under the 5.x differ (record for SchemaKit, not merged) Oct 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/migrations The differs, snapshot format, EnsureCreated and design-time wiring chore Build, CI, packaging, refactoring with no behaviour change package/core Affects EFCore.ComplexIndexes package/postgresql Affects EFCore.ComplexIndexes.PostgreSQL package/sqlserver Affects EFCore.ComplexIndexes.SqlServer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SchemaKit 11.0.0-preview.1: the first slice of the new API, on EF Core 11 / Npgsql 11 under the new ids

1 participant