Open dolmen opened 4 years ago
🤮 thanks for calling this out. Will try to fix it with the next releases.
I agree this is ugly. It could be very hard (or impossible) to synchronously release Ginkgo and Gomega because we would have to know the checksums in advance to put into go.sum
. For instance to release Ginkgo version M we need to know the checksum of Gomega version N, which in turn depends on the checksum of Ginkgo version M.
....indeed. Anyone know of an idiomatic way to resolve this? Can we specific a floating server so that, e.g. Gomega imports ginkgo@>1.12.0
and Ginkgo imports gomega@>1.10.0
and allow go to use whatever sufficiently compatible versions it finds? Not sure if that solves the go.sum
issue, though, since there's an explicitly computed checksum?
We do that. The go.mod
file specifies minimum versions and the go.sum
has checksums of versions that were actually used.
Some unpalatable options that I’ve thought of so far are:
go.sum
(the Go modules docs say you should check it in)@myitcv any ideas?
That list seems pretty comprehensive, thanks @blgm
Ironically the two are actually quite decoupled - the coupling only enters in because they leverage each other in their respective test suites.
Sorry for the slow reply, I've been off-radar for the last ~week.
This issue will be fixed by https://github.com/golang/go/issues/36460. Having cyclic module dependencies should not be an issue, and https://github.com/golang/go/issues/36460 will ensure that is the case.
In particular, if you look through the design doc linked from that issue (https://go.googlesource.com/proposal/+/master/design/36460-lazy-module-loading.md) you will note https://github.com/golang/go/issues/36369 and friends which are all (in)directly related to the problem you describe.
Thanks @myitcv! That’s really helpful.
On a project which uses go-redis which uses ginkgo v1.13.0 in its testsuite:
Each version of
ginkgo
depends on an older version ofgomega
which brings an older version ofginkgo
which... Each oldginkgo
orgomega
version brings obsolete references ingo.sum
which are not relevant for the build.Please make make a serie of synchronised release of both
gomega
andginkgo
where all their external dependencies are at the same versions to break the chain.