demo: regenerate SDK/CLI with condition: false to show toggle output#800
Closed
pyramation wants to merge 1 commit intomainfrom
Closed
demo: regenerate SDK/CLI with condition: false to show toggle output#800pyramation wants to merge 1 commit intomainfrom
pyramation wants to merge 1 commit intomainfrom
Conversation
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.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Base automatically changed from
devin/1773296925-update-schemas-fix-comments
to
main
March 12, 2026 23:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
demo: regenerate SDK/CLI with
condition: falseto preview toggle outputSummary
Preview branch demonstrating the
codegen.condition: falsetoggle from PR #799. The only hand-written changes are addingcodegen: { condition: false }to the two generate scripts (sdk/constructive-sdk/scripts/generate-sdk.tsandsdk/constructive-cli/scripts/generate-sdk.ts). Everything else (~306 files) is regenerated output.What changes in generated code when condition is disabled:
XxxConditioninterface declarations removed frominput-types.tsXxxConditiontypesfindManysignature:FindManyArgs<S, Filter, OrderBy>(3 params) instead ofFindManyArgs<S, Filter, Condition, OrderBy>(4 params)findFirstsignature:FindFirstArgs<S, Filter>(2 params) instead ofFindFirstArgs<S, Filter, Condition>(3 params)conditionproperty removed from runtime args objectsconditionTypeNameargument omitted frombuildFindManyDocument/buildFindFirstDocumentcallsNet effect: -5,106 lines of condition-related types and plumbing removed from generated output.
Review & Testing Checklist for Human
condition: falseconfig is set explicitly in both generate scripts — if you want condition enabled in production, do not merge this as-is.sdk/constructive-sdk/src/public/orm/models/user.ts) to confirm thefindMany/findFirstsignatures look correct without condition —FindManyArgs<S, UserFilter, UsersOrderBy>with no condition arg in the object literal.buildFindManyDocument/buildFindFirstDocumenthandle missingconditionTypeNameat runtime — theaddVariablehelper inquery-builder.tsshould 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
devin/1773296925-update-schemas-fix-comments(PR chore: update schemas, fix codegen bugs, add condition toggle (default: false) #799), which contains the actualconditiontoggle feature implementationcondition: false— no TypeScript errorsLink to Devin Session: https://app.devin.ai/sessions/c7c114e9d17e421bba9564e48d0421c0
Requested by: @pyramation