Skip to content

fix(swift): scope JSON helpers to standalone output - #3094

Open
foobra wants to merge 2 commits into
glideapps:masterfrom
foobra:agent/swift-helper-visibility
Open

fix(swift): scope JSON helpers to standalone output#3094
foobra wants to merge 2 commits into
glideapps:masterfrom
foobra:agent/swift-helper-visibility

Conversation

@foobra

@foobra foobra commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Closes #3093

Swift standalone output can contain duplicate module-level newJSONDecoder and newJSONEncoder declarations when several generated files are compiled together. The original single-file fix used fileprivate, but the helpers were later moved to JSONSchemaSupport.swift for multi-file output and changed back to internal visibility.

This makes the visibility conditional:

  • standalone output: fileprivate
  • --multi-file-output: internal visibility in JSONSchemaSupport.swift

Added regression coverage for both rendering modes. Verified the unit tests, build, and Swift type-checking for generated standalone and multi-file output.

@github-actions

Copy link
Copy Markdown

Generated-output differences

314 files differ — 314 modified, 0 new, 0 deleted
1256 changed lines — +628 / −628

Open the generated-output report →

@github-actions

Copy link
Copy Markdown

Generated-output differences

314 files differ — 314 modified, 0 new, 0 deleted
1256 changed lines — +628 / −628

Open the generated-output report →

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.

Swift: use file-private JSON helpers for standalone output

1 participant