grapnel icon indicating copy to clipboard operation
grapnel copied to clipboard

Support For Dependency Version Conflicts

Open willhlaw opened this issue 9 years ago • 5 comments

I'm not sure if I've seen if Grapnel currently has conflict resolution for the same 3rd party repo but specifying different versions. Nate Finch summarizes the issues but others chime in here on golang-nuts:

"I had the same thought, but in talking to Dave Cheney about it, he convinced me that it's not an easy fix.

Assuming the build number is separate from the package name, i.e.

import "github.com/foo/bar" // #2.6.0-2

You then have to worry about what happens when you import two different versions in different files. Both, in this case, will be called bar. Also, they would be downloaded to the same place on disk by "go get".

If the version number is part of the name, it munges the namespace, so any change to the version requires changing all references from bar_2_6.FooType{} to bar_2_7.FooType{}

One way to get around this is to put the version number in the path above the name... so for example github.com/foo/1.1/bar for bar version 1.1. That works with the current go get, makes sure the path is unique, etc. It's a bit of a hassle on the part of the repo maintainer, but it's the best we have for now.

It's tricky. If it wasn't, it would have already been implemented :)"

May want to look at some of the links I've posted in this gist and contemplate some of the approaches or solutions proposed.

willhlaw avatar Aug 07 '14 03:08 willhlaw