chore: migrate exportoptions to v2 (STEP-2175)#333
Open
Badlazzor wants to merge 1 commit into
Open
Conversation
Adds exportoptions as a v2 package with /v2 module imports.
API changes:
- fileutil.WriteBytesToFile(pth, b) → fileutil.NewFileManager().WriteBytes(pth, b)
- pathutil.NormalizedOSTempDirPath("output") → pathutil.NewPathProvider().CreateTempDir("output")
- Test reads switched from fileutil.ReadStringFromFile (v1-only, no v2
equivalent on FileManager) to stdlib os.ReadFile + string() conversion.
Public API of the package is unchanged: ExportOptions interface,
WritePlistToFile, WritePlistToTmpFile, AppStoreOptionsModel,
NonAppStoreOptionsModel, all constants/Method types kept verbatim.
Internal v2 callers (exportoptionsgenerator/, metaparser/, codesign/,
autocodesign/) still import v1 exportoptions. Switching them is
mechanical (signatures unchanged) and will follow in a separate PR.
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
exportoptionsas a v2 package underexportoptions/. Self-contained leaf migration — no internal go-xcode dependencies, onlyhowett.net/plist+ go-utils basics.Jira: STEP-2175 (taking over from @lpusok — no branch/PR in flight)
What changed
exportoptions/ported from v1 (4 source + 2 test files, ~975 LOC)./v2.WritePlistToFile/WritePlistToTmpFile:fileutil.WriteBytesToFile(pth, b)→fileutil.NewFileManager().WriteBytes(pth, b)pathutil.NormalizedOSTempDirPath("output")→pathutil.NewPathProvider().CreateTempDir("output")fileutil.ReadStringFromFilehas no v2 equivalent onFileManager, so reads were switched to stdlibos.ReadFilewith astring(content)conversion at the assertion site.The public surface (
ExportOptionsinterface,WritePlistToFile,WritePlistToTmpFile,AppStoreOptionsModel,NonAppStoreOptionsModel, allMethod/ key constants) is unchanged from v1.What did NOT change
~15 v2 files still import v1
exportoptions(exportoptionsgenerator/,metaparser/,codesign/,autocodesign/localcodesignasset/, plusprofileutil). Switching them is mechanical because public signatures match v1 — left for a follow-up PR to keep this one reviewable.Test plan
go test ./exportoptions/...— all tests green (Manifest, AppStoreOptions, NonAppStoreOptions, WriteToFile golden plist, Upgrade method name).go build ./...— whole repo compiles.gofmt -l exportoptions/— clean.go vet ./exportoptions/...— clean.🤖 Generated with Claude Code