oligot / go-mod-upgrade

Update outdated Go dependencies interactively
MIT License
954 stars 45 forks source link

Fails for too large modules (i.e. azure-sdk-for-go) #27

Closed roessland closed 1 year ago

roessland commented 2 years ago

Recently azure-sdk-for-go became too large for go get which causes a bunch of problems. v64.1.0 is the latest version below the size limit, and v64.2.0 is the latest version.

go-mod-upgrade     
   ⨯ upgrade failed            error=Error running go command to discover modules: exit status 1 stderr=go: loading module retractions for github.com/Azure/azure-sdk-for-go@v64.1.0+incompatible: verifying go.mod: github.com/Azure/azure-sdk-for-go@v64.2.0+incompatible/go.mod: reading https://sum.golang.org/lookup/github.com/!azure/azure-sdk-for-go@v64.2.0+incompatible: 410 Gone
        server response: not found: create zip: module source tree too large (max size is 524288000 bytes)

It would be nice if go-mod-upgrade kept working and was able to update the other (non-broken) modules.

oligot commented 2 years ago

Hi,

Unfortunately, I can't reproduce this bug as azure-sdk-for-go v65.0.0 has been released in the meantime and the actual bug has been resolved in this version.

According to this comment, you could use the environment variable GONOSUMDB as a workaround so, this should also work with go-mod-upgrade (note that I haven't tested it).

But I agree with you that go-mod-upgrade could in this case ignore the broken modules and allow to update the other modules. PR are always welcomed :smirk:

oligot commented 1 year ago

Closing this issue following the thumb up emoji. Feel free to reopen if needed.