Skip to content

PgExclusion, third slice: the read model and Redeclare without the experimental mark #90

Closed

Description

@CaffeinatedCoder

Third slice of #25. Decided by the maintainer on 2026-11-12: features ship without the experimental mark.

Problem

GetDeclarations, FindDeclaration and Redeclare are how a consumer reads declarations back and how a convention amends them. They sit on SchemaDeclarationExtensions, which was marked SK9001 as a whole.

Corrected 2026-11-12, measured with the SDK's compiler: a mark on a static class reaches a call only where the class is written. entity.Redeclare<PgExclusion>(…) compiled without an opt-in all along; SchemaDeclarationExtensions.Redeclare(entity, …) did not. And for the same reason entity.Declare(…), which is meant to ask for the opt-in, did not ask.

Change

  • The class loses the mark. Declare(IEnumerable<ISchemaObject>) carries it itself, so it asks in either call syntax: a consumer declares through a provider's typed entry point, and only a contributor's package calls Declare.
  • A test that compiles a consumer's configuration, read model and convention against the shipped assemblies with nothing suppressed, in both call syntaxes, and holds that no SK9001 is reported; and that Declare reports one.

Done when

The design's convention (entity.Redeclare<PgExclusion>(ex => ex.AndWhere(notRevoked))) and a read of the declarations compile in a project that opts into nothing.

Activity

  1. added this to the 11.0.0 milestone on Nov 12, 2026
  2. added
    enhancement
    package/core
    package/postgresql
    area/constraints
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/constraintsenhancementpackage/corepackage/postgresql

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions