Skip to content

Move iOS TypeShare output into a dedicated generated folder #43

@gemcoder21

Description

@gemcoder21

Problem

TypeShare-generated Swift models currently live directly in ios/Packages/Primitives/Sources alongside handwritten source files.

That causes tooling conflicts:

  • just generate-model rewrites generated files in place
  • just format runs swiftformat . over ios/
  • SwiftFormat can only exclude by path/glob, not by file header
  • Because generated and handwritten files share the same directory, we cannot exclude generated models without also excluding handwritten Primitives sources

In practice this means formatting churn and unstable diffs depending on whether generate-model or format ran last.

Proposed change

Move the TypeShare-generated iOS Swift models into a dedicated generated path, for example:

  • ios/Packages/Primitives/Sources/Generated/

or another clearly generated-only folder under the package.

Then update the generation pipeline and package layout so handwritten code stays outside that folder.

As part of the same change, update ios/.swiftformat to exclude the generated-only path instead of excluding the entire Primitives/Sources tree.

Why this helps

A dedicated generated directory would let us:

  • exclude generated output from SwiftFormat cleanly
  • keep formatting enabled for handwritten Primitives code
  • reduce noisy diffs after just generate-model
  • make ownership of generated vs handwritten files obvious

Acceptance criteria

  • TypeShare output is written to a generated-only folder
  • Primitives still builds without source import regressions
  • just generate-model produces files in the new location
  • ios/.swiftformat is updated to exclude the generated folder
  • just format no longer touches generated models but still formats handwritten Primitives files
  • any references, package manifests, or scripts are updated accordingly

Notes

This is iOS-specific TypeShare output, not a request to change unrelated generated artifacts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions