go-consistent
go-consistent copied to clipboard
"Unexpected package creation during export data loading" on code with generics
See https://github.com/FerretDB/FerretDB/pull/248 and https://github.com/FerretDB/FerretDB/runs/4758709579
Perhaps go-consistent needs to update its golang.org/x/tools
dependency.
It is not something as simple as just that. FerretDB uses a separate tools
module for all tools, including go-consistent, with golang.org/x/tools v0.1.8
.
Oh, ok. I'll see what could go wrong there this weekend, hopefully. I have a hunch that has something to do with the way go-consistent loads packages.
Your hunch is correct :) https://github.com/AlekSi/go-consistent/pull/1/files
That might be related:
- https://github.com/golang/go/issues/45584
- https://go-review.googlesource.com/c/tools/+/310512/
It might be fixed by https://github.com/golang/tools/commit/afc6aad76eb1194c038c653531eef344468d2ac4
Now, it sometimes fails on code with generics. For example:
/home/runner/work/FerretDB/FerretDB/internal/util/telemetry/reporter.go:204:13: iter.Close undefined (type iterator.Interface[string, any] has no field or method Close)