Skip to content

chore: migrate xcscheme to v2 (STEP-2198)#332

Open
Badlazzor wants to merge 1 commit into
masterfrom
STEP-2198-xcscheme-v2
Open

chore: migrate xcscheme to v2 (STEP-2198)#332
Badlazzor wants to merge 1 commit into
masterfrom
STEP-2198-xcscheme-v2

Conversation

@Badlazzor

@Badlazzor Badlazzor commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds xcscheme as a v2 package under xcodeproject/xcscheme/ so v2 consumers no longer have to reach back into v1 for xcscheme.Scheme, xcscheme.Open, and related types. Stage 1 of the v1→v2 migration plan — unblocks the xcodeproj migration (STEP-2169), which in turn unblocks pathfilters and xcworkspace.

Jira: STEP-2198

What changed

  • New package xcodeproject/xcscheme/ ported from v1.
  • Module imports updated to /v2.
  • go-utils/log calls dropped from Open():
    • The log.Warnf("Failed to close scheme: …") on deferred close is replaced with _ = f.Close() — the v1 code was already swallowing the close error, just logging it; same semantics minus the log line.
    • The log.Printf("Read %s scheme in %s.", …) timing line is dropped (informational only).
  • pathutil.AbsPath(pth) swapped for pathutil.NewPathModifier().AbsPath(pth) (v2 PathModifier interface).

What did NOT change

The two v2 files that import v1 xcscheme stay on v1 for now:

  • exportoptionsgenerator/targets.go
  • autocodesign/projectmanager/projecthelper.go

Both consume xcscheme.Scheme returned by v1 xcodeproj.XcodeProj.Schemes(). Switching them requires v2 xcodeproj, which is gated on STEP-2169. They'll move as part of that ticket.

Test plan

  • go test ./xcodeproject/xcscheme/... — all 5 tests pass (errors, marshalling round-trip, test plan parsing, simple scheme parsing).
  • go build ./... — whole repo compiles.
  • gofmt -l xcodeproject/xcscheme/ — clean.
  • go vet ./xcodeproject/xcscheme/... — clean.

🤖 Generated with Claude Code

Adds xcscheme as a v2 package with /v2 module imports. Drops go-utils v1
log calls; pathutil.AbsPath swapped for pathutil.NewPathModifier().AbsPath.

Internal v2 callers (exportoptionsgenerator/targets.go,
autocodesign/projectmanager/projecthelper.go) still import v1 xcscheme
because they consume v1 XcodeProj.Schemes(); switching them is gated on
xcodeproj v2 (STEP-2169).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Badlazzor Badlazzor requested a review from a team June 12, 2026 12:34
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