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

Add support for Go modules. #92

Open
dmitshur opened this issue Feb 23, 2018 · 7 comments
Open

Add support for Go modules. #92

dmitshur opened this issue Feb 23, 2018 · 7 comments

Comments

@dmitshur
Copy link
Member

dmitshur commented Feb 23, 2018

Go Package Store was created for working with the current go get -u model with a GOPATH workspace. The vgo experiment (https://research.swtch.com/vgo) considers changing that significantly. This is both an opportunity and a potential requirement to keep Go Package Store useful.

This issue is to track information and developments in this area.

I haven't explored vgo yet aside from reading over the announcement posts.

@dmitshur dmitshur changed the title Consider vgo, support for modules. Add support for Go modules. Jan 15, 2019
@dmitshur
Copy link
Member Author

I plan to implement Go module support in Go Package Store during this year.

@bep
Copy link

bep commented Jan 8, 2020

I'm not a big fan of people chiming in on issues just to say "I want this", but I was pulling the direct changes to Hugo yesterday, and even if the number of changed modules wasn't that high, doing a manual inspection of the changes (finding the repo on GitHub, browse the commit log) was time-consuming... I suspect most people just close their eyes and go a go get -u ./....

@ligustah
Copy link

ligustah commented Jan 8, 2020

@bep I've been using https://dependabot.com/ for a while (it became free after Github acquired them). Assuming you are on Github, it's just a couple clicks to install and it will open PRs with updates to your go.mod file, including changelogs/commits from the upstream module.
Can highly recommend it for keeping your dependencies up to date (and not just Go, for that matter)

@bep
Copy link

bep commented Jan 8, 2020

@ligustah OK, that I didn't know. Thanks, I will try.

@dmitshur
Copy link
Member Author

dmitshur commented Feb 2, 2020

By now I'm very familiar with module mode. In order to implement support for it, I need to make decisions about what updates to display.

In GOPATH mode, there was only one obvious answer: display all updates that you would get with go get -u, the only possible update operation.

In module mode, there are more possibilities/questions:

  • display updates only to direct module requirements, or indirect as well
  • display only the latest release or pre-release versions, or the latest pseudo-versions too

Perhaps to achieve the best experience, a UI redesign will be necessary. But I think it makes sense to start by finding a reasonable way to reuse the existing UI, and then consider further changes based on the experience.

@dmitshur
Copy link
Member Author

dmitshur commented Feb 2, 2020

I've thought about this and picked some initial answers to start with.

display only the latest release or pre-release versions, or the latest pseudo-versions too

For now, I'll do the simplest thing, which is to do what the go command does. If it's desirable to provide more flexibility, that can be done later.

display updates only to direct module requirements, or indirect as well

For now, I'll include indirect updates by default, or make them optional via a flag. I'll try to make it show up in the UI whether or not it's an indirect dependency.

@dmitshur dmitshur removed the thinking label Feb 2, 2020
@dmitshur
Copy link
Member Author

dmitshur commented Feb 2, 2020

Here's a rough first draft (with some version information quickly added to the title):

image

It generally seems to work well, but it's pretty clear module mode will need some UI changes to better visualize the old and new version, and likely not display indirect updates by default.

dmitshur added a commit that referenced this issue Mar 7, 2020
The govendor tool has been deprecated in favor of Go module mode,
see kardianos/govendor@e31350d.

Remove all support for its vendor.json file format.

Updates #92.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants