go/neo/proto: Fix protogen to work without prior `go install`
When trying to regenerate zproto-marshal.go on a fresh go workspace I got: (neo) (z-dev) (g.env) kirr@deco:~/src/neo/src/lab.nexedi.com/kirr/neo/go/neo/proto$ go generate typecheck: ../../zodb/zodb.go:174:2: could not import lab.nexedi.com/kirr/go123/mem (can't find import: "lab.nexedi.com/kirr/go123/mem") exit status 1 proto.go:57: running "sh": exit status 1 Digging around a bit this turned out to be due to that importer.Default() is using packages in only binary installed form: https://github.com/golang/go/issues/19334#issuecomment-283430322 https://github.com/golang/go/issues/11415 Fix it by using "source" importer which always looks at sources. (zproto-marshal.go stays unchanged after `go generate` rerun)
Showing
Please register or sign in to comment