Repository navigation
test: spike A, decorate the differ and the generator and check who owns them - #38
Merged
Merged
Conversation
…ns them Answers #16 on Npgsql, SQL Server and SQLite with EF Core 11.0.0-rc.3: SchemaKit can wrap IMigrationsModelDiffer and IMigrationsSqlGenerator through public API only, keep another package's replacement as its inner service, and resolve both services while the model is being built without a cycle. - spikes/A.DecoratorOwnership: the host in miniature (SpikeKit/), a stranger's package (OtherPackage/), and 21 conditions over three providers (69 tests). EF1001 is an error in the project; only the stranger's code disables it. - It takes three parts, each shown to fail its conditions when removed: taking over the ReplaceService entry, a registration of SchemaKit's own, and the resolve-time check. The plan's section 3.2 now says so, with what another package's registration becomes in each order. - One more residual, measured: a model cache shared between options with and without the kit hands the stamped model to the context without it, silently (C18). - dotnet.yml gets a Spikes lane behind the CI gate, so the answer is measured on the SDK global.json pins. Locally it ran on SDK 11.0.100-rc.1 in a scratch copy. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #16
Problem
The core plan rests on SchemaKit decorating
IMigrationsModelDifferandIMigrationsSqlGeneratorinstead of deriving from EF's classes, and on a check, made while the model is being built, that the outermost instance of both is SchemaKit's. Both were read from EF Core's source and never run. Spike A is one of the two spikes that must pass before any public API is written.Change
spikes/A.DecoratorOwnership(throwaway): the host in miniature (SpikeKit/), a stranger's package that replaces the differ the way packages do today (OtherPackage/), and 21 conditions over Npgsql, SQL Server and SQLite. No database is contacted.EF1001is an error in the project, and only the stranger's code disables it.design/schemakit-core-plan.md, section 3.2: the registration takes three parts, not one; a table of what another package's registration becomes before and afterUseSchemaKit(); theUseInternalServiceProviderorder; a fourth residual. Section 6 marks spike A as passed..github/workflows/dotnet.yml: aSpikeslane that runs everyspikes/*/*.csproj, in theCIgate'sneeds.What it answers
ApplyServicesinto a scratch collection; no EF-internal type is namedReplaceService, a type-specificReplaceService, and a registration in another extension'sApplyServices, by type or factoryReplaceServiceAddDbContextFactory,UseInternalServiceProviderAddEntityFrameworkSchemaKit()on its collection andUseSchemaKit()afterUseInternalServiceProvider()Found beyond the question: a model cache shared through
UseMemoryCachebetween options with and without the kit hands the stamped model to the context without it, and its create script silently lacks the declaration (C18). It joins the residuals the catalog verifier answers.Tests
ReplaceServicetake-over (C05, C09, C16, C19), the stamp (C03),Validate's ownership check (C06), the earlier replacement as inner (C05, C19).11.0.100-rc.1in a scratch copy, since the released SDK is not installed on the machine that wrote it. This PR'sSpikeslane is the run on SDK11.0.100.🤖 Generated with Claude Code