From 4721271d99516423a75bdff9a9f00e13d8e62dcf Mon Sep 17 00:00:00 2001 From: zzal Date: Mon, 20 Jul 2026 09:06:18 -0400 Subject: [PATCH] refactor: group internal non-product targets under Sources/_support/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The three build-scaffolding targets that are NOT products — SwiflowCSSCore, SwiflowEmbedders, MacroConsumerChecks — now live under Sources/_support/ so the Sources/ top level reads as the public catalogue (the 12 products plus the SwiflowMacrosPlugin compiler plugin) rather than 16 sibling directories that imply 16 modules to learn. Pure relocation: only the three `path:` strings in Package.swift change, the target/product graph is byte-identical (29 targets, 12 products), and no CI workflow, script, or test target references these paths (verified). Stale `// Sources//File.swift` path-echo header lines dropped from the moved files. Full suite: 1922 tests / 356 suites green. Co-Authored-By: Claude Opus 4.8 (1M context) --- Package.swift | 6 +++--- .../MacroConsumerChecks/ComponentChecks+Styles.swift | 2 -- .../MacroConsumerChecks/ComponentChecks.swift | 2 -- .../MacroConsumerChecks/PersistedChecks.swift | 2 -- .../MacroConsumerChecks/QueryMutationChecks.swift | 2 -- Sources/{ => _support}/SwiflowCSSCore/CSSScopeRules.swift | 2 -- .../{ => _support}/SwiflowEmbedders/DriverEmbedder.swift | 2 -- .../{ => _support}/SwiflowEmbedders/RuntimeCopySync.swift | 2 -- .../{ => _support}/SwiflowEmbedders/TemplateEmbedder.swift | 2 -- 9 files changed, 3 insertions(+), 19 deletions(-) rename Sources/{ => _support}/MacroConsumerChecks/ComponentChecks+Styles.swift (88%) rename Sources/{ => _support}/MacroConsumerChecks/ComponentChecks.swift (98%) rename Sources/{ => _support}/MacroConsumerChecks/PersistedChecks.swift (96%) rename Sources/{ => _support}/MacroConsumerChecks/QueryMutationChecks.swift (97%) rename Sources/{ => _support}/SwiflowCSSCore/CSSScopeRules.swift (95%) rename Sources/{ => _support}/SwiflowEmbedders/DriverEmbedder.swift (98%) rename Sources/{ => _support}/SwiflowEmbedders/RuntimeCopySync.swift (97%) rename Sources/{ => _support}/SwiflowEmbedders/TemplateEmbedder.swift (99%) diff --git a/Package.swift b/Package.swift index d45c695a..adad8452 100644 --- a/Package.swift +++ b/Package.swift @@ -49,7 +49,7 @@ let package = Package( // compile for both wasm and the host compiler plugin. .target( name: "SwiflowCSSCore", - path: "Sources/SwiflowCSSCore", + path: "Sources/_support/SwiflowCSSCore", swiftSettings: [.swiftLanguageMode(.v6)] ), .macro( @@ -115,7 +115,7 @@ let package = Package( // re-implement it inline because they couldn't import an executable). .target( name: "SwiflowEmbedders", - path: "Sources/SwiflowEmbedders", + path: "Sources/_support/SwiflowEmbedders", swiftSettings: [.swiftLanguageMode(.v6)] ), // Repo-dev codegen tool: `swift run swiflow-codegen `. @@ -235,7 +235,7 @@ let package = Package( .target( name: "MacroConsumerChecks", dependencies: ["Swiflow", "SwiflowQuery", "SwiflowStore"], - path: "Sources/MacroConsumerChecks", + path: "Sources/_support/MacroConsumerChecks", swiftSettings: [.swiftLanguageMode(.v6)] ), .testTarget( diff --git a/Sources/MacroConsumerChecks/ComponentChecks+Styles.swift b/Sources/_support/MacroConsumerChecks/ComponentChecks+Styles.swift similarity index 88% rename from Sources/MacroConsumerChecks/ComponentChecks+Styles.swift rename to Sources/_support/MacroConsumerChecks/ComponentChecks+Styles.swift index 990a3429..571cbf16 100644 --- a/Sources/MacroConsumerChecks/ComponentChecks+Styles.swift +++ b/Sources/_support/MacroConsumerChecks/ComponentChecks+Styles.swift @@ -1,5 +1,3 @@ -// Sources/MacroConsumerChecks/ComponentChecks+Styles.swift -// // The documented scopedStyles-in-extension pattern: @Component's // memberAttribute role can't reach extension members, so the explicit // @MainActor here is required — this file pins that the pattern keeps diff --git a/Sources/MacroConsumerChecks/ComponentChecks.swift b/Sources/_support/MacroConsumerChecks/ComponentChecks.swift similarity index 98% rename from Sources/MacroConsumerChecks/ComponentChecks.swift rename to Sources/_support/MacroConsumerChecks/ComponentChecks.swift index ef085e29..ae34e8c5 100644 --- a/Sources/MacroConsumerChecks/ComponentChecks.swift +++ b/Sources/_support/MacroConsumerChecks/ComponentChecks.swift @@ -1,5 +1,3 @@ -// Sources/MacroConsumerChecks/ComponentChecks.swift -// // COMPILE-ONLY GATE for the component-side macros. // `assertMacroExpansion` type-checks nothing, and the compile gates that DO // live inside test targets (BareComponentIsolationTests & friends) use diff --git a/Sources/MacroConsumerChecks/PersistedChecks.swift b/Sources/_support/MacroConsumerChecks/PersistedChecks.swift similarity index 96% rename from Sources/MacroConsumerChecks/PersistedChecks.swift rename to Sources/_support/MacroConsumerChecks/PersistedChecks.swift index 8eda740a..32393fac 100644 --- a/Sources/MacroConsumerChecks/PersistedChecks.swift +++ b/Sources/_support/MacroConsumerChecks/PersistedChecks.swift @@ -1,5 +1,3 @@ -// Sources/MacroConsumerChecks/PersistedChecks.swift -// // COMPILE-ONLY GATE for @Persisted. Consumes the macro // the way a real app does: PLAIN imports, a public @Component, public // @Persisted members read from a main-actor body. diff --git a/Sources/MacroConsumerChecks/QueryMutationChecks.swift b/Sources/_support/MacroConsumerChecks/QueryMutationChecks.swift similarity index 97% rename from Sources/MacroConsumerChecks/QueryMutationChecks.swift rename to Sources/_support/MacroConsumerChecks/QueryMutationChecks.swift index a65b0cef..d28b1265 100644 --- a/Sources/MacroConsumerChecks/QueryMutationChecks.swift +++ b/Sources/_support/MacroConsumerChecks/QueryMutationChecks.swift @@ -1,5 +1,3 @@ -// Sources/MacroConsumerChecks/QueryMutationChecks.swift -// // COMPILE-ONLY GATE for @Query/@Mutation witness isolation. // MainActorWitnessIsolation.witnessNames = ["fetch", "perform", // "optimistic", "invalidations"] is hand-encoded string policy that must diff --git a/Sources/SwiflowCSSCore/CSSScopeRules.swift b/Sources/_support/SwiflowCSSCore/CSSScopeRules.swift similarity index 95% rename from Sources/SwiflowCSSCore/CSSScopeRules.swift rename to Sources/_support/SwiflowCSSCore/CSSScopeRules.swift index a317e2af..dacc1ea5 100644 --- a/Sources/SwiflowCSSCore/CSSScopeRules.swift +++ b/Sources/_support/SwiflowCSSCore/CSSScopeRules.swift @@ -1,5 +1,3 @@ -// Sources/SwiflowCSSCore/CSSScopeRules.swift -// // The single source of truth for which CSS selectors escape component scoping. // Shared by BOTH scope-deciding paths so they can never drift: // - the runtime CSS DSL (`Swiflow.CSSSheet.scopedSelector`, wasm) diff --git a/Sources/SwiflowEmbedders/DriverEmbedder.swift b/Sources/_support/SwiflowEmbedders/DriverEmbedder.swift similarity index 98% rename from Sources/SwiflowEmbedders/DriverEmbedder.swift rename to Sources/_support/SwiflowEmbedders/DriverEmbedder.swift index b2f4a0d8..da477e9e 100644 --- a/Sources/SwiflowEmbedders/DriverEmbedder.swift +++ b/Sources/_support/SwiflowEmbedders/DriverEmbedder.swift @@ -1,5 +1,3 @@ -// Sources/SwiflowEmbedders/DriverEmbedder.swift -// // THE emit path for EmbeddedDriver.swift — invoked by the swiflow-codegen // tool (`swift run swiflow-codegen driver`), which replaced the standalone // script that used to re-implement this inline. The byte-pin test in diff --git a/Sources/SwiflowEmbedders/RuntimeCopySync.swift b/Sources/_support/SwiflowEmbedders/RuntimeCopySync.swift similarity index 97% rename from Sources/SwiflowEmbedders/RuntimeCopySync.swift rename to Sources/_support/SwiflowEmbedders/RuntimeCopySync.swift index d20196f4..2cca87b2 100644 --- a/Sources/SwiflowEmbedders/RuntimeCopySync.swift +++ b/Sources/_support/SwiflowEmbedders/RuntimeCopySync.swift @@ -1,5 +1,3 @@ -// Sources/SwiflowEmbedders/RuntimeCopySync.swift -// // The generated runtime JS lives canonically in js-driver/ and as tracked // per-example copies (7× swiflow-driver.js, 9× swiflow-service-worker.js, // plus RegionDemo's regions pair). Those copies used to be refreshed by diff --git a/Sources/SwiflowEmbedders/TemplateEmbedder.swift b/Sources/_support/SwiflowEmbedders/TemplateEmbedder.swift similarity index 99% rename from Sources/SwiflowEmbedders/TemplateEmbedder.swift rename to Sources/_support/SwiflowEmbedders/TemplateEmbedder.swift index 9ee0e15a..4ae39007 100644 --- a/Sources/SwiflowEmbedders/TemplateEmbedder.swift +++ b/Sources/_support/SwiflowEmbedders/TemplateEmbedder.swift @@ -1,5 +1,3 @@ -// Sources/SwiflowEmbedders/TemplateEmbedder.swift -// // THE emit path for EmbeddedTemplates.swift — invoked by the swiflow-codegen // tool (`swift run swiflow-codegen templates`), which replaced the standalone // script that used to duplicate this logic, and byte-pinned by the freshness