You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The refusal of a format version says the wrong thing for a version that is not a number, and for an older one #50
area/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringbugSomething isn't workingpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)severity/lowCosmetic, message or documentation-level difference
Found by the analysis of #46. Both are refused; only the message is wrong.
Problem
DeclarationCodec.Read (Declarations/Internal/DeclarationCodec.cs) checks v with TryGetInt32 before looking at the element's kind.
"v":"2" throws System.Text.Json's own InvalidOperationException, "The requested operation requires an element of type 'Number', but the target element has type 'String'", with no annotation key in it. Reproduced on .NET 9, 10 and 11.
A v below 2 gets UnknownFormatVersion, which says the snapshot "was written by a newer SchemaKit … Update the package". For an older format that is the wrong advice.
Done when
A v that is not a whole number is refused with UnknownFormatVersion and the key, and the message for a lower version does not say "newer". A test for each.
area/migrationsThe differ and generator decorators, snapshot format, EnsureCreated and the UseSchemaKit wiringbugSomething isn't workingpackage/coreAffects CodoMetis.EFCore.SchemaKit (the kernel)severity/lowCosmetic, message or documentation-level difference
Activity