Migrate root module to github.com/harness/cli/v3 imports - #189
Merged
Conversation
…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
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
go.modand everypkg/and non-har module import (code,core,gitops,iacm,pipeline,platform,rt,vibeapps) atgithub.com/harness/cli/v3, matching the repo'sv3.x.ytagging scheme (Go module semver requires the/v3suffix for major version 2+).Taskfile.ymland.goreleaser.yamlldflags,scripts/release-har.sh,.golangci.ymllocal-prefixes,local-setup.zsh, anddocs/plugins.md.harplugin module keeps its own unversioned import path (still taggedhar/v0.9.x), but now depends on the root module viagithub.com/harness/cli/v3in itsgo.mod(require+replace).Test plan
go build ./...andgo vet ./...pass in both the root module andmodules/hargo test ./...passes in both modulestask build:main,task build:har, andtask check:specs:mainsucceed end-to-end, including plugin install./bin/harness --versionshows correct ldflags-injected version, confirming the-Xsymbol paths still resolve under/v3