ffjson
ffjson copied to clipboard
Type mismatch due to vendored dependency
ffjson seems to be getting confused due to the vendor folder in another project.
cannot use event.ID (type "bitbucket.org/50onred/projectA/vendor/github.com/satori/go.uuid".UUID) as type "github.com/satori/go.uuid".UUID in assignment
The code compiles just fine with go build, but when I run ffjson on my file to generate code it fails. It looks like the vendor folder of the other project is throwing it off. If I remove this folder bitbucket.org/50onred/hopper/vendor/github.com/satori/go.uuid".UUID then it works as expected.
To reproduce:
- Create two folders in $GOPATH projA and projB
- In projA create a struct that has a field with type
"github.com/satori/go.uuid".UUID - In projB create a struct with a field with type
"github.com/satori/go.uuid".UUID - In the code of projB try and assign uuid field from struct in projA to uuid field in struct from projB
- Run ffjson on .go file in projB containing struct.
How did you solve this problem ? I am getting similar problem.