Re:Learning Go as a Python Developer: The Good and the Bad
by oars on Monday July 18, 2022 @07:27PM
(#32145481)
Haven't had any issues in Go so far.
[ Parent
| on HN ]
Re:Learning Go as a Python Developer: The Good and the Bad
by mypalmike on Monday July 18, 2022 @09:42PM
(#32146500)
As soon as you take 2 dependencies in any language, there's a chance you will not be able to upgrade both of them to latest versions because somewhere in the two dependency subgraphs there is a conflict. There's no magic to avoid this, though tooling can help find potentially working versions (at least by declaration). It's often the case that you don't encounter conflicts in Python or other languages, but I don't imagine that Go is immune.
Re:Learning Go as a Python Developer: The Good and the Bad
by jhardy54 on Monday July 18, 2022 @10:01PM
(#32146660)
Are you familiar with npm? I haven’t used it deeply in years, but the last time I checked it still supported conflicting dependencies.
If A and B both depend on different versions of C, then both versions of C are installed and A/B see the version they want.
Re:Learning Go as a Python Developer: The Good and the Bad
by mypalmike on Monday July 18, 2022 @10:20PM
(#32146783)
I've used npm but an not familiar with these kinds of details of it. There would seem to be some potential putfalls, such as two libraries accessing a single system resource (a config file, a system socket, etc.). I will take a look into this though. Thanks.
Re:Learning Go as a Python Developer: The Good and the Bad
by fiddlerwoaroof on Wednesday July 20, 2022 @07:38PM
(#32173875)
npm works around some problems like this with a concept of "peer dependencies" which are dependencies that can only be depended on once. The typical dependency, though, is scoped to the package that requires it.
Re:Learning Go as a Python Developer: The Good and the Bad
by pkolaczk on Monday July 18, 2022 @11:11PM
(#32147106)
Rust can include different versions of the same library (crate) in a single project just fine. As long as those are private dependencies, no conflicts would happen. A conflict would happen only if two libraries pass around values of a shared type, but each wanted a different version of the crate that defines the type.
I can't see a reason why Go would be different.