Repository navigation
feat: the read model and Redeclare carry no experimental mark, and Declare carries its own - #91
Merged
Merged
Conversation
…clare carries its own Closes #90. 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 #90
Problem
Decided on 2026-11-12: features ship without the experimental mark.
GetDeclarations,FindDeclarationandRedeclaresat on a class markedSK9001as a whole.Measured with the SDK's compiler while building this: a mark on a static class reaches a call only where the class is written. So
entity.Redeclare<PgExclusion>(…)compiled without an opt-in all along and onlySchemaDeclarationExtensions.Redeclare(entity, …)did not. For the same reasonentity.Declare(…), which is a contributor's call and meant to ask for the opt-in, did not ask.Change
SchemaDeclarationExtensionsloses the mark, andDeclarecarries it itself. Reading and amending ask for nothing in either call syntax;Declareasks in both.ConsumerCompileTests: a consumer's code compiled with Roslyn against the shipped assemblies with nothing suppressed. Every other test project opts intoSK9001, so none of them would notice a feature that asks a consumer for the same.PublicSurfaceTestsholds which of the class's methods is marked, so a method added later has to be put on one side.No other class-level mark in the kernel is on a class of extension methods:
AddSchemaContributorwas marked on the method from the start.Tests
458 kernel, 70 PostgreSQL offline, 125 probes. No statement that reaches a server changed.
DeclarePostgreswith a list,SuppressBtreeGistInjection,Predicate.Ofover an interface,RedeclarewithAndWhere,GetDeclarationswith a walk over the elements and awith,FindDeclaration, and one call that names the class. No error and noSK9001.Metadata.Declare([…])in the same compilation reports exactly oneSK9001. A compiler that reported no experimental diagnostic at all would pass the first test.Each guard shown to fail, in a scratch copy:
Of_the_declaration_methods_only_Declare_is_marked_experimentalDeclareunmarkedThe_kernels_own_Declare_asks_for_the_opt_in, the kernel'sRedeclaremarkedKeyTargetmarkedNo_declaration_value_is_marked_experimental🤖 Generated with Claude Code