Skip to content

demo: regenerate SDK/CLI with condition: false to show toggle output#800

Closed
pyramation wants to merge 1 commit intomainfrom
devin/1773302975-condition-disabled
Closed

demo: regenerate SDK/CLI with condition: false to show toggle output#800
pyramation wants to merge 1 commit intomainfrom
devin/1773302975-condition-disabled

Conversation

@pyramation
Copy link
Contributor

demo: regenerate SDK/CLI with condition: false to preview toggle output

Summary

Preview branch demonstrating the codegen.condition: false toggle from PR #799. The only hand-written changes are adding codegen: { condition: false } to the two generate scripts (sdk/constructive-sdk/scripts/generate-sdk.ts and sdk/constructive-cli/scripts/generate-sdk.ts). Everything else (~306 files) is regenerated output.

What changes in generated code when condition is disabled:

  • All XxxCondition interface declarations removed from input-types.ts
  • Model files no longer import XxxCondition types
  • findMany signature: FindManyArgs<S, Filter, OrderBy> (3 params) instead of FindManyArgs<S, Filter, Condition, OrderBy> (4 params)
  • findFirst signature: FindFirstArgs<S, Filter> (2 params) instead of FindFirstArgs<S, Filter, Condition> (3 params)
  • condition property removed from runtime args objects
  • conditionTypeName argument omitted from buildFindManyDocument/buildFindFirstDocument calls

Net effect: -5,106 lines of condition-related types and plumbing removed from generated output.

Review & Testing Checklist for Human

  • Decide if this is the desired default for the SDK going forward, or if this branch is purely for preview purposes. The condition: false config is set explicitly in both generate scripts — if you want condition enabled in production, do not merge this as-is.
  • Spot-check a generated model (e.g. sdk/constructive-sdk/src/public/orm/models/user.ts) to confirm the findMany/findFirst signatures look correct without condition — FindManyArgs<S, UserFilter, UsersOrderBy> with no condition arg in the object literal.
  • Verify buildFindManyDocument/buildFindFirstDocument handle missing conditionTypeName at runtime — the addVariable helper in query-builder.ts should skip undefined type names. This was implemented in PR chore: update schemas, fix codegen bugs, add condition toggle (default: false) #799 but is exercised for the first time here.

Notes

Link to Devin Session: https://app.devin.ai/sessions/c7c114e9d17e421bba9564e48d0421c0
Requested by: @pyramation

Sets codegen.condition = false in both constructive-sdk and
constructive-cli generate scripts, then regenerates all output.

This shows what the generated code looks like with condition types
and arguments completely omitted from findMany/findFirst methods.
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Base automatically changed from devin/1773296925-update-schemas-fix-comments to main March 12, 2026 23:53
@pyramation pyramation closed this Mar 12, 2026
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