Closed purpleidea closed 2 years ago
I can't seem to make this work. Locally if I do this:
$ go-mod-upgrade
• Discovering modules...
⨯ upgrade failed error=Error running go command to discover modules: exit status 1 stderr=go list -m: loading module retractions for github.com/coreos/go-systemd@v0.0.0-20190321100706-95778dfbb74e: no matching versions for query "latest"
go list -m: loading module retractions for gopkg.in/fsnotify.v1@v1.4.7: version "v1.5.1" invalid: go.mod has non-....v1 module path "github.com/fsnotify/fsnotify" at revision v1.5.1
I get these scary errors. I've tried different things... Not sure how to fix this. It does build though. And the build errors here are different, but possible related??
@frebib I tried your branch as well and I get the same error locally...
The old system with vendor/ and git submodules worked great, unfortunately FUD around git submodules seemed to scare people away and golang moved to a go.mod system that adds a new lock file format instead of using the built-in git version. It's now almost impossible to use modern golang without this, so we've switched.
So much for the golang compatibility promise-- turns out it doesn't apply to the useful parts that I actually care about like this.
Thanks to frebib for his incredibly valuable contributions to this patch. This snide commit message is mine alone.
This patch also mixes in some changes due to legacy golang as we've also bumped the minimum version to 1.16 in the docs and tests.