Task: Consider switch from dep to Go modules

Created on 14 Jun 2018  路  7Comments  路  Source: go-task/task

Seems that vgo is the future and we should switch at some point.

Not sure about how vgo deals with the vendor directory. We probably want to keep:

  • Deterministic builds
  • go get not triggering clones from many repos
enhancement

Most helpful comment

Agreed on waiting for 1.11. I'll have a PR ready when 1.11 is released.

All 7 comments

FYI, I do plan to move mvdan.cc/sh/... to being a module. However, since I am already at v2, doing so would break the build with older Go versions.

They released Go 1.9.3 and 1.10.3 specifically for this - these versions have minimal support for the vgo transition, so they will be able to build my packages even after I change my import paths to mvdan.cc/sh/v2/....

I'll just wait a little longer, for these versions to have been released for a while. That way, the chances that my switch will break anyone's development setup will be way lower. You can still switch task to being a Go module, you'll just have to pin a commit of mine instead of a semantic version.

@mvdan Thanks for you input!

Yeah, it makes sense to wait until it's safer to do the migration. I haven't tried vgo yet.

So, will go get read the modules file and use the exact commit? Or it will just download the last major version?

Also, is the vendor directory gone on vgo? (That would makes totally sense, but can be a pain for those who install a tool like this using go get).

I'd suggest reading the vgo proposal - it has a FAQ section that should answer all of your questions :)

But just as quick answers - you can say "version X or later", where X can be a semantic version or a certain commit. And I believe the vendor folder won't go away, but module mirrors will also be an option.

@mvdan OK, thanks for answering!

It might be good to at least wait for go 1.11, where this is going to be included in the Go toolchain as an experiment.

Agreed on waiting for 1.11. I'll have a PR ready when 1.11 is released.

TIL the vendor directory will be ignored when using go modules: https://twitter.com/fatih/status/1033275429317214208

That may help us keeping both methods working in a transition step

Was this page helpful?
0 / 5 - 0 ratings