lileio / lile

Easily generate gRPC services in Go ⚡️
MIT License
1.51k stars 88 forks source link

make build error #52

Closed jinq0123 closed 6 years ago

jinq0123 commented 6 years ago
[jinqing@localhost src]$ go get -u github.com/lileio/lile/...
[jinqing@localhost src]$ lile new lileio/users
Creating project in /home/jinqing/go/src/github.com/lileio/users
Is this OK? [y]es/[n]o
y
...
[jinqing@localhost users]$ make build
go build -o build/lileio/users lileio/users/main.go
stat lileio/users/main.go: no such file or directory
make: *** [build] Error 1
[jinqing@localhost users]$ cat Makefile
# vi: ft=make

GOPATH:=$(shell go env GOPATH)

.PHONY: proto test

proto:
        go get github.com/golang/protobuf/protoc-gen-go
        protoc -I . users.proto --lile-server_out=. --go_out=plugins=grpc:${GOPATH}/src

build: proto
        go build -o build/lileio/users lileio/users/main.go

test:
        @go get github.com/rakyll/gotest
        gotest -p 1 -v ./...
[jinqing@localhost users]$ ls
client.go  Dockerfile  Makefile  server  subscribers  users  users.proto
[jinqing@localhost users]$ pwd
/home/jinqing/go/src/github.com/lileio/users
[jinqing@localhost users]$
arbarlow commented 6 years ago

Hi, i think you might need to run make proto first before running your make

jinq0123 commented 6 years ago
[jinqing@localhost src]$ pwd
/home/jinqing/go/src
[jinqing@localhost src]$ go get -u github.com/lileio/lile/...
[jinqing@localhost src]$ lile new lileio/users
Creating project in /home/jinqing/go/src/github.com/lileio/users
Is this OK? [y]es/[n]o
y
.
├── server
│   ├── server.go
│   └── server_test.go
├── subscribers
│   └── subscribers.go
├── users
│   ├── cmd
│   │   ├── root.go
│   │   └── up.go
│   └── main.go
├── users.proto
├── client.go
├── Makefile
├── Dockerfile
└── .gitignore

[jinqing@localhost src]$ cd /home/jinqing/go/src/github.com/lileio/users
[jinqing@localhost users]$ ls
client.go  Dockerfile  Makefile  server  subscribers  users  users.proto
[jinqing@localhost users]$ make build
go get github.com/golang/protobuf/protoc-gen-go
protoc -I . users.proto --lile-server_out=. --go_out=plugins=grpc:/home/jinqing/go/src
2018/08/07 03:35:40 [Creating] server/get.go
2018/08/07 03:35:40 [Creating test] server/get_test.go
go build -o build/lileio/users lileio/users/main.go
stat lileio/users/main.go: no such file or directory
make: *** [build] Error 1
[jinqing@localhost users]$ ls
client.go   Makefile  subscribers  users.pb.go
Dockerfile  server    users        users.proto
[jinqing@localhost users]$
arbarlow commented 6 years ago

I"m sorry, I'm still no sure what's going on, but trying the new Go modules support will probably help