I have this problem:
Golang picks out X v0.2.0 and calls it good. But it is not good. v0.1 and v0.2 are different enough that A breaks and my project doesn't compile.
What options do I have to fix this?
The offical go stance seems to be "developers of X were doing it wrong and should've released a major version after breaking changes". But that doesn't help the current situation.
I can't find discussions of practical solutions.
Further information
Things I've tried:
go.mod. It works but makes updates to those modules slow and error prone.go mod vendor, but couldn't find a solution.You can, for example, create local copies of the both modules and use replace directives along with a pseudo major versions to import multiple versions of the same repo using different tags:
replace moduleX/v1010 => ./src/moduleX/0.1.0
replace moduleX/v1020 => ./src/moduleX/0.2.0
Then in your project would use either of the versions as needed:
import (
moduleX_010 "moduleX/v1010"
moduleX_020 "moduleX/v1020"
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With