Skip to content

fix(sql): load filesystem migrations from their own module - #9157

Merged
tim-smart merged 7 commits into
Effect-TS:v4/next-minorfrom
bezff:fix/migrator-filesystem-loader
Oct 14, 2026
Merged

tim-smart merged 7 commits into
Effect-TS:v4/next-minorfrom
bezff:fix/migrator-filesystem-loader

Conversation

@bezff

@bezff bezff commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move fromFileSystem to effect/sql/MigratorFileSystem.
  • effect/sql/Migrator no longer contains a dynamic import, so Metro can import fromRecord, including through @effect/sql-sqlite-react-native/SqliteMigrator.
  • Keep MigratorFileSystem out of the generated effect/sql barrel, so import { SqlClient } from "effect/sql" also bundles under Metro. The @barrel(...) annotation parser now accepts patterns that contain ).
  • Other SQL migrators still re-export fromFileSystem.

Closes #6347
Closes EFF-2146

Test plan

  • nix develop -c pnpm test --run packages/effect/test/Migrator.test.ts packages/tools/utils
  • nix develop -c pnpm codegen (no diff)
  • nix develop -c pnpm lint
  • nix develop -c pnpm check
  • Bundled the built dist with Metro 0.87.1 (@react-native/metro-config defaults, package exports enabled):

Metro rejects effect/sql/Migrator when it sees a non-literal dynamic import, so React Native cannot import fromRecord.
@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7055d8d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 33 packages
Name Type
effect Minor
@effect/sql-sqlite-react-native Minor
@effect/opentelemetry Minor
@effect/vitest Minor
@effect/ai-anthropic Minor
@effect/ai-cloudflare Minor
@effect/ai-openai-compat Minor
@effect/ai-openai Minor
@effect/ai-openrouter Minor
@effect/ai-typesafe Minor
@effect/atom-react Minor
@effect/atom-solid Minor
@effect/atom-vue Minor
@effect/platform-browser Minor
@effect/platform-bun Minor
@effect/platform-deno Minor
@effect/platform-node-shared Minor
@effect/platform-node Minor
@effect/sql-clickhouse Minor
@effect/sql-d1 Minor
@effect/sql-libsql Minor
@effect/sql-mssql Minor
@effect/sql-mysql2 Minor
@effect/sql-pg Minor
@effect/sql-pglite Minor
@effect/sql-sqlite-bun Minor
@effect/sql-sqlite-do Minor
@effect/sql-sqlite-node Minor
@effect/sql-sqlite-wasm Minor
@effect/docgen Minor
@effect/doctest Minor
@effect/graphql-generator Minor
@effect/openapi-generator Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@effect-bot
effect-bot changed the base branch from main to v4/next-minor October 14, 2026 11:23
The JSDoc check requires @stability and @SInCE on each public export.
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 39.03 KB 39.03 KB 0.00 KB (0.00%)
basic.ts 7.07 KB 7.07 KB 0.00 KB (0.00%)
batching.ts 10.78 KB 10.78 KB 0.00 KB (0.00%)
brand.ts 6.71 KB 6.71 KB 0.00 KB (0.00%)
cache.ts 11.00 KB 11.00 KB 0.00 KB (0.00%)
config.ts 22.45 KB 22.45 KB 0.00 KB (0.00%)
differ.ts 21.56 KB 21.56 KB 0.00 KB (0.00%)
http-client.ts 23.47 KB 23.47 KB 0.00 KB (0.00%)
http-router.ts 35.15 KB 35.15 KB 0.00 KB (0.00%)
logger.ts 11.32 KB 11.32 KB 0.00 KB (0.00%)
metric.ts 9.13 KB 9.13 KB 0.00 KB (0.00%)
optic.ts 6.94 KB 6.94 KB 0.00 KB (0.00%)
pubsub.ts 15.42 KB 15.42 KB 0.00 KB (0.00%)
queue.ts 12.26 KB 12.26 KB 0.00 KB (0.00%)
schedule.ts 11.45 KB 11.45 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 13.81 KB 13.81 KB 0.00 KB (0.00%)
schema-binary.ts 40.21 KB 40.21 KB 0.00 KB (0.00%)
schema-class.ts 21.24 KB 21.24 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 32.37 KB 32.37 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 27.46 KB 27.46 KB 0.00 KB (0.00%)
schema-string-transformation.ts 14.66 KB 14.66 KB 0.00 KB (0.00%)
schema-string.ts 12.07 KB 12.07 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.24 KB 16.24 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 38.56 KB 38.56 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 25.57 KB 25.57 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 20.49 KB 20.49 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 20.70 KB 20.70 KB 0.00 KB (0.00%)
schema-toFormatter.ts 20.80 KB 20.80 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 25.42 KB 25.42 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 20.78 KB 20.78 KB 0.00 KB (0.00%)
schema.ts 20.43 KB 20.43 KB 0.00 KB (0.00%)
stm.ts 13.39 KB 13.39 KB 0.00 KB (0.00%)
stream.ts 10.10 KB 10.10 KB 0.00 KB (0.00%)

@effect-janitor effect-janitor Bot added the bug Something isn't working label Oct 14, 2026
@effect-bot
effect-bot force-pushed the v4/next-minor branch 2 times, most recently from 00e071b to 7973b4e Compare October 14, 2026 19:41
@effect-bot
effect-bot force-pushed the v4/next-minor branch 4 times, most recently from 0bffc15 to a9ce30e Compare October 14, 2026 20:17
@tim-smart
tim-smart enabled auto-merge (squash) October 14, 2026 20:18
@tim-smart
tim-smart disabled auto-merge October 14, 2026 20:19
@tim-smart
tim-smart merged commit f6c10e3 into Effect-TS:v4/next-minor Oct 14, 2026
9 checks passed
@effect-bot effect-bot mentioned this pull request Oct 14, 2026
effect-bot added a commit that referenced this pull request Oct 14, 2026
effect-bot added a commit that referenced this pull request Oct 14, 2026
effect-bot added a commit that referenced this pull request Oct 14, 2026
effect-bot added a commit that referenced this pull request Oct 14, 2026
tim-smart pushed a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 15, 2026
effect-bot added a commit that referenced this pull request Oct 16, 2026
effect-bot added a commit that referenced this pull request Oct 16, 2026
effect-bot added a commit that referenced this pull request Oct 16, 2026
effect-bot added a commit that referenced this pull request Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working v4/next-minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

From Discord: React Native Incompatibility with fromFileSystem Dynamic Imports in effect/unstable/sql/Migrator

3 participants