Skip to content

Migrate root module to github.com/harness/cli/v3 imports - #189

Merged
sawka-harness merged 6 commits into
mainfrom
sawka/v3-imports
Sep 4, 2026
Merged

Migrate root module to github.com/harness/cli/v3 imports#189
sawka-harness merged 6 commits into
mainfrom
sawka/v3-imports

Conversation

@sawka-harness

Copy link
Copy Markdown
Collaborator

Summary

  • Repoints go.mod and every pkg/ and non-har module import (code, core, gitops, iacm, pipeline, platform, rt, vibeapps) at github.com/harness/cli/v3, matching the repo's v3.x.y tagging scheme (Go module semver requires the /v3 suffix for major version 2+).
  • Updates the associated tooling that hardcodes the import path: Taskfile.yml and .goreleaser.yaml ldflags, scripts/release-har.sh, .golangci.yml local-prefixes, local-setup.zsh, and docs/plugins.md.
  • The har plugin module keeps its own unversioned import path (still tagged har/v0.9.x), but now depends on the root module via github.com/harness/cli/v3 in its go.mod (require + replace).

Test plan

  • go build ./... and go vet ./... pass in both the root module and modules/har
  • go test ./... passes in both modules
  • task build:main, task build:har, and task check:specs:main succeed end-to-end, including plugin install
  • ./bin/harness --version shows correct ldflags-injected version, confirming the -X symbol paths still resolve under /v3

…ports

The repo tags core releases as v3.x.y, but go.mod and all imports still
used the unsuffixed path, which is invalid per Go module semver rules
for major version 2+. Repoints go.mod, every pkg/ and non-har module
import, and the associated ldflags/lint/setup tooling at the /v3 path.
The har plugin module keeps its own unversioned path (tagged
har/v0.9.x) but now depends on the root module via github.com/harness/cli/v3.

AI-Session-Id: 7ce5d644-601b-42fb-980f-044645de5de2
AI-Tool: claude-code
AI-Model: unknown
main gained cmd/testexpr (#188) after this branch was cut, still importing
the unsuffixed pkg/exprenv path; the merge brought it in unfixed. Also
regroups imports in a few modules/har files where pkg/* (now /v3-prefixed)
and modules/har-internal imports had been sharing a block — goimports now
splits them since they no longer share a local-prefix.

AI-Session-Id: 7ce5d644-601b-42fb-980f-044645de5de2
AI-Tool: claude-code
AI-Model: unknown
The replace directive still points local dev at ../../ so this has no
effect on the dev/build flow, but it keeps the declared version honest
for anyone resolving har's go.mod outside this repo.
# Conflicts:
#	cmd/harness/main-harness.go
#	modules/core/mgmt/install.go
#	pkg/specloader/specloader.go
#	pkg/specloader/specloader_test.go
modules/vibeapps and pkg/registry/uitableview_test.go were added on
main after this branch's import migration, so they merged in with
unversioned github.com/harness/cli/pkg paths.

AI-Session-Id: 7ce5d644-601b-42fb-980f-044645de5de2
AI-Tool: claude-code
AI-Model: unknown
@sawka-harness
sawka-harness merged commit cfb36aa into main Sep 4, 2026
1 check passed
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