Hi,

I don't fully understand why we have to use replace directives (I'm still learning my way around go modules), but I have tried extensively to remove them and I can't get go mod to honour an acceptable set of versions in the requirement.

I am guessing at a few potential reasons why this situation may be; some guesses may be wrong, and I do recognise that the cases are all horrible:

1- There are cases where packages in the imported libraries end in paths like /v1 (but where this predates and has nothing to do with go modules). I don't know if that can confuse the go module version decision logic.

2- There are cases where the package repos have git tags in the form vX.Y.Z which also predate and have nothing to do with go modules. I don't know if that can confuse things either.

3- There are quite potentially errors in the defined package inter-dependencies which are driving the go module decision logic to resolve to use versions which are unacceptable to me; I have no idea.

4- There are also cases (I tried to omit this in my original mail in an attempt to simplify) where an imported package is a fork where the original package has gone away (e.g. bitbucket.org/ww/goautoneg) or where a genuine fork has been made but neither the fork nor the code that imports it has yet been updated with the new import paths.

All of this is pretty disgusting, but it's also completely outside my control to get fixed quickly. I think it's a real world example of complexities and technical debt involved in a large scale system involving multiple separate teams which are themselves trying to migrate to go modules and whose release timescales slow down getting fixes out of the door (oh, for a monorepo!).

I guess I'm trying to work out the least worst way of working around this sort of thing as a lowly package importer.

Cheers,

Jim

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/eb6927f7-5915-ac11-d7ac-1dbaa03b1630%40minter.uk.

Reply via email to