Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go module path for major version 2 #2913

Closed
5 tasks done
runephilosof-karnovgroup opened this issue Dec 6, 2023 · 3 comments · Fixed by #2905
Closed
5 tasks done

Update go module path for major version 2 #2913

runephilosof-karnovgroup opened this issue Dec 6, 2023 · 3 comments · Fixed by #2905
Labels
bug Something isn't working

Comments

@runephilosof-karnovgroup
Copy link
Contributor

Component

other

Describe the bug

Getting versiogo.woodpecker-ci.org/woodpecker/v2n 2.0.0 of the go library results in an error

runephilosof@fedora:~/code/platform-woodpecker/woodpecker-repo-configurator (master)$ go get go.woodpecker-ci.org/woodpecker@v2.0.0
go: go.woodpecker-ci.org/woodpecker@v2.0.0: invalid version: module contains a go.mod file, so module path must match major version ("go.woodpecker-ci.org/woodpecker/v2")

System Info

go version go1.20.11 linux/amd64

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
  • Check that this is a concrete bug. For Q&A join our Discord Chat Server or the Matrix room.
@anbraten
Copy link
Member

anbraten commented Dec 6, 2023

That's pretty annoying that we have to update the import paths of the whole codebase each time we release a major version 🙈 However I guess we need to change it then and release 2.1.0 to fix it.

@runephilosof-karnovgroup
Copy link
Contributor Author

I guess the versioning of the go library and other go code can be separated somehow.
That would lower the amount of files that need to change.
The server go code is not a library, so it should not need to be versioned this way.
Avoiding "go.woodpecker-ci.org/woodpecker/v2/server" would be nice.

@qwerty287
Copy link
Contributor

Maybe we should move the woodpecker-go SDK to its own repo? But for now, I'd merge the PR and do this afterwards.

anbraten pushed a commit that referenced this issue Dec 8, 2023
https://go.dev/doc/modules/release-workflow#breaking

Fixes #2913 fixes
#2654
```
runephilosof@fedora:~/code/platform-woodpecker/woodpecker-repo-configurator (master)$ go get go.woodpecker-ci.org/woodpecker@v2.0.0
go: go.woodpecker-ci.org/woodpecker@v2.0.0: invalid version: module contains a go.mod file, so module path must match major version ("go.woodpecker-ci.org/woodpecker/v2")
```

---------

Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants