Skip to content

go: adopt /v8 module path for Go major versioning compliance - #9716

Merged
taylorsilva merged 1 commit into
concourse:masterfrom
alicul:go-respect-versioning
Oct 3, 2026
Merged

taylorsilva merged 1 commit into
concourse:masterfrom
alicul:go-respect-versioning

Conversation

@alicul

@alicul alicul commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • 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:

NOTE: The change is purely mechanical — no logic, no behavior changes, no API modifications.

Closes: #9715

@alicul

alicul commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor Author

@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" {} +

@taylorsilva

Copy link
Copy Markdown
Member

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
@alicul
alicul force-pushed the go-respect-versioning branch from cac1c33 to 3ebbf33 Compare October 3, 2026 00:15
@alicul

alicul commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

There were some conflicts so I rebased on master.

@alicul

alicul commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

None of the CodeQL failures are due to this PR, but due to code changes touching the files that already suffer from these issues.

Alerts not introduced by this pull request might have been detected because the code changes were too large.

@taylorsilva

Copy link
Copy Markdown
Member

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 taylorsilva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did a static analysis to verify nothing was sneakily added 😉

@taylorsilva
taylorsilva merged commit e5a8402 into concourse:master Oct 3, 2026
10 of 11 checks passed
@alicul
alicul deleted the go-respect-versioning branch October 3, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Adopt /v8 major version module path for Go module compliance

2 participants