go: adopt /v8 module path for Go major versioning compliance - #9716
Conversation
|
@taylorsilva I think this PR is ready as it is. Just tell me if you prefer that I immediately include a bash script like the one described in: #9715 directly as part of this PR or in a separate PR later? Do we even need a script like that? Basically a one liner like this is sufficient... find . -type f -name "*.go" -not -path "./vendor/*" -exec \
sed -i "s|\"github.com/concourse/concourse/${OLD_VER}|\"github.com/concourse/concourse/${NEW_VER}|g" {} + |
|
No script needed, it's a very easy thing to do if we ever need to do it again in the future. I'll probably hold off on merging this until after the next patch release, just to keep CI noise to a minimum for me. |
Concourse is currently at v8.x, but go.mod still declared github.com/concourse/concourse without a major version suffix. Under Go module rules (Import Compatibility Rule), any module at v2+ must include the major version suffix in its module path. Because this was missing, the Go toolchain rejected v8 releases for downstream consumers with: go: version "v8.3.0" invalid: go.mod has non-.../v8 module path This commit: - Updates the module path in go.mod to github.com/concourse/concourse/v8 - Rewrites internal package imports to use the /v8 prefix - Updates import paths in .deepsource.toml References: - https://go.dev/blog/v2-go-modules - https://go.dev/blog/module-compatibility
cac1c33 to
3ebbf33
Compare
|
There were some conflicts so I rebased on master. |
|
None of the CodeQL failures are due to this PR, but due to code changes touching the files that already suffer from these issues.
|
|
This will probably keep getting merge conflicts every time another PR is merged 😬 Debating between holding off merging this one before other PRs... bleh I think I'll just merge this. Will cause conflicts for every other PR probably, but I'd rather just get the pain over with. |
taylorsilva
left a comment
There was a problem hiding this comment.
Did a static analysis to verify nothing was sneakily added 😉
go: adopt /v8 module path for Go major versioning compliance
Concourse is currently at v8.x, but go.mod still declared github.com/concourse/concourse without a major version suffix. Under Go module rules (Import Compatibility Rule), any module at v2+ must include the major version suffix in its module path. Because this was missing, the Go toolchain rejected v8 releases for downstream consumers with:
go: version "v8.3.0" invalid: go.mod has non-.../v8 module path
This commit:
References:
NOTE: The change is purely mechanical — no logic, no behavior changes, no API modifications.
Closes: #9715