Upgrade inet.af/netaddr for compatibility with Go 1.18
Also CI upgrade to confirm go version 1.17+ above
We are using this library for our geolocation converter.
One day, the Ci of our converter failed suddenly with the bellowing messages.
$ ./mmdb ./testdata
panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated to assert that it's safe against the go1.18 runtime. If you want to risk it, run with environment variable ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.18 set. Notably, if go1.18 adds a moving garbage collector, this program is unsafe to use.
goroutine 1 [running]:
go4.org/unsafe/assume-no-moving-gc.init.0()
/go/pkg/mod/go4.org/unsafe/assume-no-moving-gc@v0.0.0-2020[122](https://xxxxxxxxxxx/yyyyy/mmdb/-/jobs/64830#L122)2180813-1025295fd063/untested.go:24 +0x1f4
This mmdb command is just our converter to be built on a docker container which has been made by the image of golang/1.18
Moreover, This library's tests failed with the same messages at my localhost. Thus this library has certainly the above issue.
mmdbwriter % go test
go: downloading github.com/stretchr/testify v1.7.2
go: downloading github.com/davecgh/go-spew v1.1.0
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated to assert that it's safe against the go1.18 runtime. If you want to risk it, run with environment variable ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH=go1.18 set. Notably, if go1.18 adds a moving garbage collector, this program is unsafe to use.
goroutine 1 [running]:
go4.org/unsafe/assume-no-moving-gc.init.0()
/Users/yugo-horie/.go/pkg/mod/go4.org/unsafe/assume-no-moving-gc@v0.0.0-20201222180813-1025295fd063/untested.go:24 +0x1f4
exit status 2
FAIL github.com/maxmind/mmdbwriter 0.352s
go version
mmdbwriter % go version
go version go1.18.3 darwin/amd64
After patching, we retest all tests that have failed, and it looks fine that.
% go test
PASS
ok github.com/maxmind/mmdbwriter 0.513s
So we applied the compatibility issue for this library.
Can you review and test this patch ASAP?
We are using this library for our geolocation converter. One day, the Ci of our converter failed suddenly with the bellowing messages.
This
mmdb
command is just our converter to be built on a docker container which has been made by the image ofgolang/1.18
We've investigated, found a similar issue, and fixed it with this patch. https://github.com/grafana/loki/issues/5875 https://github.com/grafana/loki/pull/6046
Moreover, This library's tests failed with the same messages at my localhost. Thus this library has certainly the above issue.
go version
After patching, we retest all tests that have failed, and it looks fine that.
So we applied the compatibility issue for this library. Can you review and test this patch ASAP?