Skip to content

fix(compose): drop orphan projectName in ComposeBuild.run()#135

Open
chrisgeo wants to merge 1 commit into
mainfrom
fix-composebuild-unused-projectname
Open

fix(compose): drop orphan projectName in ComposeBuild.run()#135
chrisgeo wants to merge 1 commit into
mainfrom
fix-composebuild-unused-projectname

Conversation

@chrisgeo

@chrisgeo chrisgeo commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Cleans up an unused let projectName = resolveProjectName(for: dockerCompose) declaration in ComposeBuild.run() (line 93). Triggered a #no-usage warning on every build.

Why it existed

CHAOS-1436 Phase B unified the three buildService implementations (across ComposeUp, ComposeBuild, ComposeCreate) onto extension ComposeCommand with a new 7-param signature that no longer takes projectName — image tags became service.image ?? "\(serviceName):latest". The orphan declaration in ComposeBuild survived because Swift only warns on unused let bindings; the build still succeeded.

Scope check

  • ✅ The remote build path's separate projectName declaration (inside the if RuntimeExecutionMode.isRemote block, line 86) is untouched — it's used immediately by remoteBuild(projectName:).
  • ✅ No call sites of ComposeBuild reference projectName from this scope.

Test plan

  • swift build clean — warning gone
  • swift test --skip Container-Compose-DynamicTests --experimental-event-stream-output ... --filter "ComposeBuild|BuildConfiguration|RuntimeBuildPull"38 passed, 0 failed, 0 skipped (1 environmental XPC-timeout suite-level issue, unrelated)
  • CI green

CHAOS-1436 Phase B unified `buildService` onto `extension ComposeCommand`
with a 7-param signature that no longer takes `projectName` (image tags
are now `service.image ?? "\(serviceName):latest"`). The local
`let projectName = resolveProjectName(for: dockerCompose)` in
`ComposeBuild.run()` survived as orphan code — Swift emits a `#no-usage`
warning for it but doesn't fail the build.

The remote path's separate `projectName` declaration (inside the
`if RuntimeExecutionMode.isRemote` block) is unaffected — it's used
immediately by `remoteBuild(projectName:)`.
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.

1 participant