chore: migrate xcscheme to v2 (STEP-2198)#332
Open
Badlazzor wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
xcschemeas a v2 package underxcodeproject/xcscheme/so v2 consumers no longer have to reach back into v1 forxcscheme.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
xcodeproject/xcscheme/ported from v1./v2.go-utils/logcalls dropped fromOpen():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.log.Printf("Read %s scheme in %s.", …)timing line is dropped (informational only).pathutil.AbsPath(pth)swapped forpathutil.NewPathModifier().AbsPath(pth)(v2 PathModifier interface).What did NOT change
The two v2 files that import v1
xcschemestay on v1 for now:exportoptionsgenerator/targets.goautocodesign/projectmanager/projecthelper.goBoth consume
xcscheme.Schemereturned by v1xcodeproj.XcodeProj.Schemes(). Switching them requires v2xcodeproj, 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