Repository navigation
test: spike B, design time without .targets from a packed consumer - #39
Merged
Merged
Conversation
Answers #17: a package with no build/ folder gets every design-time and runtime path through UseSpikeKit() on the context's options alone. 62 paths on SQLite, Npgsql and SQL Server, with a parameterless constructor, an IDesignTimeDbContextFactory and a host, judged by scaffolded content or by what the database holds. - spikes/B.DesignTime: spike A's kit packed, a consumer copied outside the repository, and run.sh, which drives dotnet-ef 11.0.0-rc.3 through migrations add, has-pending-model-changes, script, script --idempotent, database update, a bundle and dbcontext optimize, and the application through EnsureCreated(), GenerateCreateScript() and Migrate(). - The spike differ now emits a real CREATE INDEX, ended with the provider's statement terminator. Without the terminator every path passed except the scripts, which did not apply; the rows that apply them were added for it and failed before the fix. - A compiled model without the kit is loud at EnsureCreated() and Migrate(): EF builds the design-time model from OnModelCreating. A user's own IDesignTimeServices differ stays silent, as the plan says. - The plan records all of it (sections 3.2, 3.8, 4, 6, 8); the Spikes lane gets a PostgreSQL service and runs spike scripts. 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 #17
Problem
The plan drops the
.targets-injectedDesignTimeServicesReferenceAttributeand wires SchemaKit throughUseSchemaKit()alone. That rested on readingDesignTimeServicesBuilderin EF Core's source, never on a packed consumer. In 5.x the.targetswere the delivery mechanism, and a migration that scaffolded without them was the failure hardest to see. Spike B is the second of the two spikes that must pass before any public API is written.Change
spikes/B.DesignTime(throwaway): spike A's kit as a package (SpikeKit.Package/, nobuild/folder), a consumer copied outside the repository in three variants (parameterless constructor,IDesignTimeDbContextFactory, a host withAddDbContext), andrun.sh, which restores through a private package cache and source mapping and drivesdotnet-ef11.0.0-rc.3 and the application.spikes/A.DecoratorOwnership/SpikeKit/Decorators.cs: the differ emits a realCREATE INDEXandDROP INDEX, ended with the provider's statement terminator, so a path is judged by the catalog.design/schemakit-core-plan.md: design time measured (3.2), the compiled-model residual corrected (3.2), the terminator rule (3.8), scripts applied and not only read (4), both spikes passed (6, 8)..github/workflows/dotnet.yml: theSpikeslane gets a PostgreSQL 18 service and runsspikes/*/run.sh, writing each table to the job summary.What it answers
.targets?migrations add,has-pending-model-changes,migrations scriptwith and without--idempotent,database update, a bundle,dbcontext optimize, in all three variantsEnsureCreated(),GenerateCreateScript(),Migrate(). The databases hold both indexes on SQLite and PostgreSQL 18has-pending-model-changesreports it andMigrate()refuses withPendingModelChangesWarningmigrations addis refused at the declaration and writes nothing, also when only the design-time factory forgets itFound beyond the question:
database update, the bundle andMigrate()accepted it; both generated scripts failed to apply (42601). A check of the script's text was green throughout.EnsureCreated()andMigrate(), because EF builds the design-time model fromOnModelCreating. The plan had it as a silent residual.IDesignTimeServicesdiffer is silent, as the plan says: the migration scaffolds without the index and the snapshot hides it from every later diff. It doubles as the control for the content checks.Tests
syntax error at or near "INSERT", and"END"for the idempotent script) and pass after it.11.0.100-rc.1in a scratch copy, with PostgreSQL 18 in a container. This PR'sSpikeslane is the run on SDK11.0.100.🤖 Generated with Claude Code