`nirvana api` need to be compatible with `go mod`
kdada opened this issue · 6 comments
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
/kind feature
What happened:
I created a nirvana project with go mod and the project is not in $GOPATH
. nirvana api
in this project failed with messages:
INFO 0320-11:49:45.516+08 api.go:87 | No packages are specified, defaults to pkg/apis
WARN 0320-11:49:45.516+08 builder.go:69 | can't find project file, instead by default config
FATAL 0320-11:49:45.516+08 api.go:61 | can't find descriptors from []
What you expected to happen:
Generate api as normal.
How to reproduce it (as minimally and precisely as possible):
- Create a nirvana project in
/tmp/myproject
- Run
nirvana api
in/tmp/myproject
Anything else we need to know?:
API generator can't find correct packages because of the mechanism of go mod
. The generator should use system relative path rather than packages from $GOPATH
.
/assign kdada
#299 only switch to go mod
for Nirvana, but it does not make nirvana api
to support go mod. @hezhizhen
#299 only switch to
go mod
for Nirvana, but it does not makenirvana api
to support go mod. @hezhizhen
I mistook it for nirvana init