Re:Go and Versioning: Minimal Version Selection
by stubish on Thursday February 22, 2018 @05:27AM
(#16436611)
Major versions of the same library are available, referenced by different paths.
It works if they don't reference any global resources outside of their own package. If they do reference any global resources (such as the using the standard flag package, paths on the filesystem, mutexes etc.), then things can fail badly. Yes, this means if one of your dependencies pulls in a different major version of a package than used by other dependencies, then they can end up duelling over resources.
Re:Go and Versioning: Minimal Version Selection
by bbatha on Wednesday February 21, 2018 @09:08PM
(#16434649)
vgo will guarantee that you only receive a single resolved minor version for any given major of a package. Each major will be imported as a different name, e.g. `import “registry.io/my/pkg”` for v1, `import “registry.io/my/pkg/v2”, etc. Because vendoring is disallowed by vgo that means that you don’t need to worry about issues like `import “registry.io/pkg”` conflicting with `import “yourlib/vendor/registry.io/pkg”`.
Not that I'd want to, just wondering how it works.