infobloxopen / protoc-gen-gorm

A protobuf compiler plugin designed to generate GORM models and APIs for simple object persistence tasks.
Apache License 2.0
559 stars 162 forks source link

fail `go get github.com/infobloxopen/protoc-gen-gorm` with golang 1.13 #174

Open xmlking opened 5 years ago

xmlking commented 5 years ago

go get github.com/infobloxopen/protoc-gen-gorm

 github.com/infobloxopen/protoc-gen-gorm/plugin
go/src/github.com/infobloxopen/protoc-gen-gorm/plugin/imports.go:114:16: cannot use dep (type string) as type generator.GoPackageName in argument to p.Generator.PrintImport
go/src/github.com/infobloxopen/protoc-gen-gorm/plugin/imports.go:114:16: cannot use dep (type string) as type generator.GoImportPath in argument to p.Generator.PrintImport
go/src/github.com/infobloxopen/protoc-gen-gorm/plugin/imports.go:123:16: cannot use a (type string) as type generator.GoPackageName in argument to p.Generator.PrintImport
go/src/github.com/infobloxopen/protoc-gen-gorm/plugin/imports.go:123:36: cannot use githubImports[a].packagePath (type string) as type generator.GoImportPath in argument to p.Generator.PrintImport
go/src/github.com/infobloxopen/protoc-gen-gorm/plugin/plugin.go:111:26: cannot use file.FileDescriptorProto (type *descriptor.FileDescriptorProto) as type string in argument to p.Generator.SetFile
go/src/github.com/infobloxopen/protoc-gen-gorm/plugin/plugin.go:149:13: p.FileOf undefined (type *OrmPlugin has no field or method FileOf)
go/src/github.com/infobloxopen/protoc-gen-gorm/plugin/plugin.go:187:13: p.FileOf undefined (type *OrmPlugin has no field or method FileOf)
xmlking commented 5 years ago

try also

go get -d github.com/infobloxopen/protoc-gen-gorm
cd ~/go/src/github.com/infobloxopen/protoc-gen-gorm
make install

error

Calebjh commented 5 years ago

I think this is a symptom of the same issue as #98, I think. The Protobuf libraries (golang and gogo) make a big jump from v1.0.0 to v1.1.1 last year which deprecated a lot of functions used in this project. According to https://github.com/infobloxopen/protoc-gen-gorm/issues/98#issuecomment-449442406 doing a make vendor in the project repo can resolve some of the issues, but may also introduce other ones.

I'd love to fix this, but it looked like it would require some pretty significant refactoring when I probed into it last year. There may also be a simple solution to make it install with the proper dependencies, but I've always found dependency resolution confusing, so my hopes aren't high that I would figure it out.