deno/dispatch.go:10:26: undefined: BaseMsg

Created on 1 Jun 2018  路  10Comments  路  Source: denoland/deno

I run go get -u github.com/ry/deno/... following the README.md,
and got this message

$ go get  -u github.com/ry/deno/...
# github.com/ry/deno
../deno/dispatch.go:10:26: undefined: BaseMsg
../deno/dispatch.go:30:10: undefined: BaseMsg
../deno/dispatch.go:62:14: undefined: BaseMsg
../deno/dispatch.go:68:34: undefined: Msg
../deno/dispatch.go:119:13: select case must be receive, send or assign recv
../deno/fetch.go:13:11: undefined: Msg
../deno/fetch.go:16:8: undefined: Msg_FETCH_REQ
../deno/fetch.go:29:14: undefined: Msg
../deno/main.go:38:15: undefined: Asset
../deno/main.go:110:19: undefined: Msg
../deno/main.go:110:19: too many errors

Most helpful comment

@qti3e
Yes, thanks for your help.
I have build success in my mac.
When I run make, I got some error message like this
protoc --go_out=. msg.proto protoc-gen-go: program not found or is not executable
I type conmand below
export PATH="$PATH:$GOPATH/bin"
It is work fine for me.
Hope my solution can help some macOS user.

All 10 comments

$ go version
go version go1.10.2 darwin/amd64

The error states that BaseMsg is undefined, and that's because BaseMsg is defined inside msg.pb.go, this file should be generated using:

protoc --go_out=. msg.proto

and actually that's not how you supposed to build deno, you should use make deno, it will do all the build-related stuff for you : )

PS make sure you have all the deps (read README)

sudo apt-get install libgtk-3-dev pkg-config ccache

When i run go get -u github.com/ry/deno/..., I got the same error.
I found BaseMsg is not defined in the dispatch.go.
BaseMsg should be a struct, but it is not defined.

FYI: BaseMsg is defined inside msg.pb.go

type BaseMsg struct {
    Channel              string   `protobuf:"bytes,1,opt,name=channel" json:"channel,omitempty"`
    Payload              []byte   `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

Met the same error, but I guess you can still run the rest build steps successfully.

@qti3e Thanks! make (under GOPATH/src/github.com/ry/deno) works.
@yuqingc Thanks too.

@ulivz yes.

image

Thank you guys.

@ztplz Have you solved your issue...?

@qti3e
Yes, thanks for your help.
I have build success in my mac.
When I run make, I got some error message like this
protoc --go_out=. msg.proto protoc-gen-go: program not found or is not executable
I type conmand below
export PATH="$PATH:$GOPATH/bin"
It is work fine for me.
Hope my solution can help some macOS user.

Was this page helpful?
0 / 5 - 0 ratings