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

go.mod doesn't follow requirements #125

Closed
pp3345 opened this issue Nov 18, 2018 · 3 comments · Fixed by #172
Closed

go.mod doesn't follow requirements #125

pp3345 opened this issue Nov 18, 2018 · 3 comments · Fixed by #172

Comments

@pp3345
Copy link

pp3345 commented Nov 18, 2018

Currently, the go.mod of godbus looks like this:

module github.com/godbus/dbus

and we have a tag called v5.0. This doesn't work for Go modules. Every version must include a major, a minor and a patch number (e.g., v5.0.0):

Modules must be semantically versioned in the form v(major).(minor).(patch), such as v0.1.0, v1.2.3, or v3.0.1. The leading v is required.
-- https://github.com/golang/go/wiki/Modules#modules

Furthermore, modules that are v2 or higher should have a branch for the major version and must include /vX in their module path:

Update the go.mod file to include a /v3 at the end of the module path in the module directive (e.g., module github.com/my/module/v3). Update import statements within the module to also use /v3 (e.g., import "github.com/my/module/v3/foo"). Tag the release with v3.0.0.
-- https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Otherwise it's impossible to correctly import godbus as a module.

@Xuanwo
Copy link

Xuanwo commented Jun 14, 2019

So let's make a PR for this?

Change module github.com/godbus/dbus to module github.com/godbus/dbus/v5 maybe.

@bminer
Copy link
Contributor

bminer commented Aug 8, 2019

I bumped into this also. Might as well bump to v6 because of this issue.

From https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Note that if you are adopting modules for the first time for a pre-existing repository or set of packages that have already been tagged v2.0.0 or higher before adopting modules, then the recommended best practice is to increment the major version when first adopting modules.

dbus hasn't really adopted modules correctly yet, so I think pushing to v6 is the right move here.

@bminer
Copy link
Contributor

bminer commented Aug 8, 2019

I'll make a PR for this. A simple one-liner. It will need to be released under tag v6.0.0

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 a pull request may close this issue.

3 participants