TML-2984: declare contractSpace on the core extension descriptor - #967
Conversation
…r (spec+plan amended, slice 03 authored) Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
ContractSpace was already a framework-level type; only the declaration site was family-level. ControlExtensionDescriptor now carries the optional member, families keep their storage-narrowed overrides, and the ControlStack bridges fall: ContractSpaceCarryingDescriptor is gone and assembleExtensionContracts property-picks a typed contractJson with no cast. Grep gate tightened: contractSpace.contractJson casts are forbidden repo-wide, both reach-through and picked-variable forms. Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
Signed-off-by: Serhii Tatarintsev <tatarintsev@prisma.io>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@prisma-next/extension-author-tools
@prisma-next/mongo-runtime
@prisma-next/family-mongo
@prisma-next/sql-runtime
@prisma-next/family-sql
@prisma-next/extension-arktype-json
@prisma-next/middleware-cache
@prisma-next/mongo
@prisma-next/extension-paradedb
@prisma-next/extension-pgvector
@prisma-next/extension-postgis
@prisma-next/postgres
@prisma-next/sql-orm-client
@prisma-next/sqlite
@prisma-next/extension-supabase
@prisma-next/target-mongo
@prisma-next/adapter-mongo
@prisma-next/driver-mongo
@prisma-next/contract
@prisma-next/utils
@prisma-next/config
@prisma-next/errors
@prisma-next/framework-components
@prisma-next/operations
@prisma-next/ts-render
@prisma-next/contract-authoring
@prisma-next/ids
@prisma-next/psl-parser
@prisma-next/psl-printer
@prisma-next/cli
@prisma-next/cli-telemetry
@prisma-next/config-loader
@prisma-next/emitter
@prisma-next/language-server
@prisma-next/migration-tools
prisma-next
@prisma-next/vite-plugin-contract-emit
@prisma-next/mongo-codec
@prisma-next/mongo-contract
@prisma-next/mongo-value
@prisma-next/mongo-contract-psl
@prisma-next/mongo-contract-ts
@prisma-next/mongo-emitter
@prisma-next/mongo-schema-ir
@prisma-next/mongo-query-ast
@prisma-next/mongo-orm
@prisma-next/mongo-query-builder
@prisma-next/mongo-lowering
@prisma-next/mongo-wire
@prisma-next/sql-contract
@prisma-next/sql-errors
@prisma-next/sql-operations
@prisma-next/sql-schema-ir
@prisma-next/sql-contract-psl
@prisma-next/sql-contract-ts
@prisma-next/sql-contract-emitter
@prisma-next/sql-lane-query-builder
@prisma-next/sql-relational-core
@prisma-next/sql-builder
@prisma-next/target-postgres
@prisma-next/target-sqlite
@prisma-next/adapter-postgres
@prisma-next/adapter-sqlite
@prisma-next/driver-postgres
@prisma-next/driver-sqlite
commit: |
size-limit report 📦
|
c3a4f43
into
tml-2984-slice-02-extension-contracts
Slice 03 of the lsp-interpreter-diagnostics project (TML-2984). Stacked on #948 — the base is the slice-02 branch; only the top commits are this slice. Operator-authorized scope addition: contract spaces are a framework concept, so the descriptor should say so.
Changes
ControlExtensionDescriptorgainsreadonly contractSpace?: ContractSpace— the type already lived in core (control-spaces.ts: "contract-space identity is a framework concept, not a SQL-specific one"); only the member declaration was missing. Both families' existing narrowed overrides (ContractSpace<Contract<SqlStorage>>,ContractSpace<MongoContract<MongoStorageShape>>) compile unchanged — zero family-package edits.ContractSpaceCarryingDescriptor(the structural view slice 02 introduced) is gone;assembleExtensionContractsreads the typed member — the lastcontractSpace.contractJsoncast in the repo is deleted. The load-order view (DependencyDeclaringDescriptor) is deliberately kept:buildExtensionLoadOrderis public API consumed byfamily-sql, its structural parameter is a contract rather than a cast bridge, and typing it would cost fixture fabrication and API narrowing for zero cast savings.Why
Every structural cast this project has been melting down existed because consumers could see the descriptors (
stack.extensionPacks) but not their contract spaces — the member was declared per-family despite both families agreeing on its shape. Declaring it once in core makes typed access universal for any current or future family, makesextensionContracts(slice 02) cast-free to build, and lets the grep gate hold the strongest possible line: zerocontractJsoncasts anywhere.Project spec + plan live under
projects/lsp-interpreter-diagnostics/(deleted at project close-out).