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.
Problem
TypeShare-generated Swift models currently live directly in
ios/Packages/Primitives/Sourcesalongside handwritten source files.That causes tooling conflicts:
just generate-modelrewrites generated files in placejust formatrunsswiftformat .overios/PrimitivessourcesIn practice this means formatting churn and unstable diffs depending on whether
generate-modelorformatran 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/.swiftformatto exclude the generated-only path instead of excluding the entirePrimitives/Sourcestree.Why this helps
A dedicated generated directory would let us:
Primitivescodejust generate-modelAcceptance criteria
Primitivesstill builds without source import regressionsjust generate-modelproduces files in the new locationios/.swiftformatis updated to exclude the generated folderjust formatno longer touches generated models but still formats handwrittenPrimitivesfilesNotes
This is iOS-specific TypeShare output, not a request to change unrelated generated artifacts.