Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify pkgnames for messages defined in pb/messages.proto #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Specify pkgnames for messages defined in pb/messages.proto #11

wants to merge 2 commits into from

Conversation

syucream
Copy link

When I tried examples in getamis/grpc-contract, I got below errors:

$ make run name=NameService
solc --bin --abi --optimize --overwrite -o . NameService.sol
mkdir -p contracts
sol2proto --pkg contracts --abi NameService.abi
mv *.proto contracts
protoc --go_out=plugins=grpc:./contracts -I contracts -I /Users/ryo/.go/src/ contracts/*.proto
messages.proto:18:5: "TransactOpts" is not defined.
make: *** [run] Error 1

It might be caused by missing specifying pk. package names so I want to add that.

@yutelin yutelin requested a review from markya0616 May 13, 2018 15:36
Conflicts:
	grpc/types.go
@syucream
Copy link
Author

@markya0616 I've fixed conflict. Could you review this? 🙏

@alanchchen
Copy link
Contributor

alanchchen commented Jul 6, 2018

Adding package name as prefix doesn't make sense.
Consider a message defined in foo.proto, I think it will be

message FooReq {
    string arg1 = 1;
    pkg.TransactOpts opts = 2;
}

I want to avoid this case.
I think the example in grpc-contract is broken. Have you tried the latest version of grpc-contract?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants