Skip to content

Remove v1 go-utils / go-steputils dependencies - #116

Open
pgyula wants to merge 1 commit into
masterfrom
remove-v1-goutils-steputils
Open

Remove v1 go-utils / go-steputils dependencies#116
pgyula wants to merge 1 commit into
masterfrom
remove-v1-goutils-steputils

Conversation

@pgyula

@pgyula pgyula commented Jul 31, 2026

Copy link
Copy Markdown

Summary

  • Moved all go-utils and go-steputils usage in this step to their v2 APIs, with dependencies (EnvRepository, Logger, FileManager, PathChecker, PathModifier, ruby.CommandFactory/Environment) injected explicitly.
  • Gemfile.lock version parsing had no v2 equivalent upstream, so that logic is ported locally in gemlockfile.go.
  • Bumped go-utils/v2 to alpha.36 (needed for FilterPaths/SortPathsByComponents/fileutil), which pulls in Go 1.21 as a build requirement.
  • go-xcode stays on v1 (out of scope, Milestone 5) — a small adapter bridges its v1-typed path filters to the v2 filter signature.

After this change, go.mod no longer requires v1 go-utils/go-steputils directly. v1 go-utils remains only as an indirect dependency pulled in transitively by go-xcode.

Test plan

  • go build ./...
  • go vet ./...
  • gofmt -l .
  • go test ./... (all existing unit tests pass unmodified)
  • Ad-hoc real-filesystem check of the Podfile search path (temp dir, not part of the diff)
  • E2E workflow (bitrise.yml sample/e2e) runs on CI

Move all go-utils and go-steputils usage to their v2 APIs, with
dependencies (EnvRepository, Logger, FileManager, PathChecker,
PathModifier, ruby.CommandFactory/Environment) injected explicitly
instead of relying on package-level v1 functions.

Gemfile.lock version parsing had no v2 equivalent upstream, so that
logic is ported locally in gemlockfile.go. go-utils/v2 is bumped to
alpha.36 to get FilterPaths/SortPathsByComponents/fileutil, which
pulls in Go 1.21 as a build requirement.

go-xcode stays on v1 (out of scope, tracked separately); a small
adapter bridges its v1-typed path filters to the v2 filter signature
so the step doesn't need to import v1 go-utils just for that.

@benbitrise benbitrise left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally the gemlockfile.go string parsing stuff would have some tests

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.

2 participants