Skip to content

Fix Sync Streams iif arity validation#644

Open
sravan27 wants to merge 1 commit into
powersync-ja:mainfrom
sravan27:fix-sync-streams-iif-arity
Open

Fix Sync Streams iif arity validation#644
sravan27 wants to merge 1 commit into
powersync-ja:mainfrom
sravan27:fix-sync-streams-iif-arity

Conversation

@sravan27
Copy link
Copy Markdown

Summary

  • validate Sync Streams iif() calls with the same three-argument arity used by the evaluator
  • add compiler regressions for two-arg and four-arg iif() calls
  • add a patch changeset for @powersync/service-sync-rules

Why

iif is implemented and documented as iif(x, y, z), but the compiler previously accepted any call with at least two arguments. That allowed invalid sync definitions such as iif(1, 2) or iif(1, 2, 3, 4) through validation even though the runtime implementation only consumes three arguments.

Verification

  • corepack pnpm --filter @powersync/service-sync-rules exec vitest run test/src/compiler/sqlite.test.ts
  • corepack pnpm --filter @powersync/service-sync-rules build:tsc

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 21, 2026

🦋 Changeset detected

Latest commit: d95d0dd

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

This PR includes changesets to release 16 packages
Name Type
@powersync/service-sync-rules Patch
@powersync/service-core Patch
@powersync/lib-services-framework Patch
@powersync/service-module-mongodb-storage Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mssql Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres-storage Patch
@powersync/service-module-postgres Patch
@powersync/service-module-core Patch
@powersync/service-image Patch
test-client Patch
@powersync/service-rsocket-router Patch
@powersync/lib-service-mongodb Patch
@powersync/lib-service-postgres Patch
@powersync/service-schema Patch

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

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.

1 participant