Skip to content

chore(psl): unhide the typedSql preview feature - #5836

Merged
aqrln merged 2 commits into
mainfrom
chore/unhide-typed-sql-preview-feature
Jul 8, 2026
Merged

chore(psl): unhide the typedSql preview feature#5836
aqrln merged 2 commits into
mainfrom
chore/unhide-typed-sql-preview-feature

Conversation

@tensordreams

Copy link
Copy Markdown
Contributor

What

Moves the TypedSql preview feature from the hidden set to the active set in psl-core's feature classification (psl/psl-core/src/common/preview_features.rs).

This is a visibility-only change — no behavior changes. typedSql was already a valid, fully functional preview feature when enabled explicitly in a schema; being hidden only meant it was excluded from tooling surfaces (autocomplete in language tools) and from the "Expected one of: ..." list in validation error messages. After this change it appears in both.

The two tests that embed the rendered list of visible preview features (psl/psl/tests/config/generators.rs and psl/psl/tests/validation/preview_features/native_full_text_search_postgres/mysql.prisma) gain typedSql in their expected output. No other test or snapshot in the repository pins the classification (verified by sweeping for the rendered list and for TypedSql references).

Why now

Prisma ORM's agent-native documentation work recommends TypedSQL as the escape hatch for several known pitfalls (e.g. full-text search on PostgreSQL), but neither users nor AI agents can discover a hidden flag: it never shows up in autocomplete or in the valid-feature listings that errors print. Making the feature visible closes that discoverability gap.

What stays as is

  • reactNative remains hidden.
  • GA/stabilization of typedSql is explicitly out of scope — that would make $queryRawTyped generation unconditional and is a separate decision with its own compatibility questions.

Validation

  • CLICOLOR_FORCE=1 cargo test -p psl --features all — 1,297 tests green (CLICOLOR_FORCE matches the CI unit-test environment; the expect-test snapshots embed ANSI colors).
  • cargo test -p psl-core --all-features — green.
  • cargo fmt --check -p psl-core — clean.
  • CI (make test-unit, workspace-wide with --all-features) is the authoritative surface for the remaining crates; a repository-wide sweep found no other snapshot embedding the visible-features list.

Move TypedSql from the hidden preview-feature set to the active set,
so that typedSql appears in schema tooling autocomplete and in the
list of valid preview features shown by validation errors. The
feature's behavior is unchanged: it was already valid and functional
when enabled explicitly; only its visibility changes. ReactNative
remains hidden.

The two tests embedding the rendered list of visible features gain
typedSql in their expected output.

Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
@CLAassistant

CLAassistant commented Jul 3, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b481e035-ed6b-4982-ab90-17b2142ff715

📥 Commits

Reviewing files that changed from the base of the PR and between 94c2c1f and 74156eb.

📒 Files selected for processing (1)
  • psl/psl-core/src/common/preview_features.rs

Summary by CodeRabbit

  • Bug Fixes

    • Updated preview feature handling so typedSql is now treated as an active, visible preview feature (not hidden).
    • Refreshed preview feature validation messaging to keep error output consistent.
  • Tests

    • Updated preview feature test expectations to account for typedSql being listed as visible/allowed.

Walkthrough

This change reclassifies TypedSql from the hidden preview feature set to the active preview feature set in FeatureMapWithProvider::new. Related test expectations are updated so a generator diagnostic includes typedSql, and a validation snapshot updates its ANSI formatting while keeping the error message content unchanged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: making typedSql visible by moving it from hidden to active.
Description check ✅ Passed The description matches the changeset and explains the visibility-only TypedSql update and test expectation changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/unhide-typed-sql-preview-feature
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/unhide-typed-sql-preview-feature

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codspeed-hq

codspeed-hq Bot commented Jul 3, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 11 untouched benchmarks
⏩ 11 skipped benchmarks1


Comparing chore/unhide-typed-sql-preview-feature (74156eb) with main (1171e96)

Open in CodSpeed

Footnotes

  1. 11 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Wasm Query Compiler File Size

Engine This PR Base branch Diff
Postgres 3.508MiB 3.508MiB -2.000B
Postgres (gzip) 1.143MiB 1.143MiB 0.000B
Postgres (size-optimized) 1.767MiB 1.767MiB -2.000B
Postgres (size-optimized, gzip) 695.607KiB 695.612KiB -5.000B
Mysql 3.461MiB 3.461MiB -6.000B
Mysql (gzip) 1.128MiB 1.128MiB -4.000B
Mysql (size-optimized) 1.737MiB 1.737MiB -2.000B
Mysql (size-optimized, gzip) 684.342KiB 684.344KiB -2.000B
Sqlite 3.378MiB 3.378MiB -6.000B
Sqlite (gzip) 1.099MiB 1.099MiB 49.000B
Sqlite (size-optimized) 1.693MiB 1.693MiB -2.000B
Sqlite (size-optimized, gzip) 667.393KiB 667.397KiB -4.000B
SQL Server 3.596MiB 3.596MiB -6.000B
SQL Server (gzip) 1.161MiB 1.161MiB -4.000B
SQL Server (size-optimized) 1.766MiB 1.766MiB -2.000B
SQL Server (size-optimized, gzip) 698.450KiB 698.453KiB -3.000B
CockroachDB 3.558MiB 3.558MiB -2.000B
CockroachDB (gzip) 1.162MiB 1.162MiB -6.000B
CockroachDB (size-optimized) 1.792MiB 1.792MiB -2.000B
CockroachDB (size-optimized, gzip) 705.559KiB 705.558KiB 1.000B

@aqrln aqrln added this to the 7.9.0 milestone Jul 6, 2026
Comment thread psl/psl-core/src/common/preview_features.rs Outdated
Apply the review suggestion: a single-variant set does not need the
brace form.

Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
@aqrln
aqrln merged commit 348f230 into main Jul 8, 2026
104 checks passed
@aqrln
aqrln deleted the chore/unhide-typed-sql-preview-feature branch July 8, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants