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

remove go module settings #772

Merged
merged 1 commit into from
Sep 28, 2019
Merged

remove go module settings #772

merged 1 commit into from
Sep 28, 2019

Conversation

shirou
Copy link
Owner

@shirou shirou commented Sep 28, 2019

from #663 (and also related to #681), I think go mod is not match for us currently. so I just remove go module settings in this PR.

When a situation changed, this change will be reverted.

@shirou shirou requested a review from Lomanic September 28, 2019 12:01
Copy link
Collaborator

@Lomanic Lomanic left a comment

Choose a reason for hiding this comment

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

If it fixes all our issues with go modules, then let's delete go.mod indeed.

@shirou shirou merged commit 5d6f343 into master Sep 28, 2019
@shirou shirou deleted the feature/remove_modules branch September 28, 2019 22:42
@jefferai
Copy link

jefferai commented Nov 4, 2019

@shirou all you needed to do was update the module path in the go.mod file. Now the library doesn't have any native handling with go modules users. Can you please revert this and just fix the go.mod file?

@shirou
Copy link
Owner Author

shirou commented Nov 9, 2019

I have tried update module path in go.mod, but no luck. from this blog v2 libraries with separate branches is not so supported. But I don't want to separate directories for this version. So, I decide not support go mod at least go module becomes default for all supported version (that means 1.15) because go mod breaks backward compatibility to non-go module users.

@jefferai
Copy link

jefferai commented Dec 6, 2019

@shirou I think you are misunderstanding that blog. You can absolutely use different branches. You can even use the same branch and simply change the module version in go.mod.

Go modules relies on tagging only. If you want to use multiple branches, that's totally supported. Simply ensure that when you cut tags that you are cutting them against the correct branch.

So for instance you could have a v1 branch with
module github.com/shirou/gopsutil
and any v1 tags you cut (v1.2.3) you cut against commits on the v1 branch.

Then you can update master to have
module github.com/shirou/gopsutil/v2
and cut v2 tags (v2.0.4) against master.

When you want a v3 you can make v2 into a new branch -- or not, because all that actually matters is that the go.mod file in the commit that your tag points to has the correct version matching the tag version.

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 this pull request may close these issues.

3 participants