Go mod tidy 1.17 duplicates require()

Hi,

I’ve notice that on one of my projects that has a go.mod with:

go 1.16

if I change it to 1.17 and run go mod tidy it duplicates the entire require() block? Is this something new in 1.17? A bug?

tried on a simple project and the same is happening… I’m I safe to assume this is normal?

module github.com/narven/example-go-mod

go 1.17

require github.com/valyala/fasthttp v1.30.0

require (
	github.com/andybalholm/brotli v1.0.2 // indirect
	github.com/klauspost/compress v1.13.4 // indirect
	github.com/valyala/bytebufferpool v1.0.0 // indirect
)

module github.com/narven/example-go-mod

go 1.16

require github.com/valyala/fasthttp v1.30.0

This a new feature, Go 1.17 is released - The Go Blog

1 Like