-
Notifications
You must be signed in to change notification settings - Fork 158
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
sed: /go/src/grpc/file_2.pb.go: No such file or directory #81
Comments
I see the issue is not related with the gripmock, instead the way you define your You probably found inspiration from this example file . It define the |
Thank you Ahmad. Yeah it's with subfolders. Will try it out once the PR is
merged.
…On Wed, Jul 28, 2021 at 7:53 AM Ahmad Muzakki ***@***.***> wrote:
I see the issue is not related with the gripmock, instead the way you
define your .proto file. It explicitly said Missing 'go_package' option
in "file_1.proto".
You probably find inspiration from this example file
<https://github.com/tokopedia/gripmock/blob/283a8f73083199ff96260ff2c5ba99b59b921add/example/multi-package/bar/bar.proto#L5>.
It define the go_package option.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC26SKT6M4GEIO3UI7Z4GR3TZ7VU3ANCNFSM5AG2MREA>
.
|
Hey I don't think your issue is regarding stub subfolder, so the PR I
mentioned before is not relevant.
On Wed, Jul 28, 2021 at 11:15 PM sonalibishwas ***@***.***>
wrote:
… Thank you Ahmad. Yeah it's with subfolders. Will try it out once the PR is
merged.
On Wed, Jul 28, 2021 at 7:53 AM Ahmad Muzakki ***@***.***>
wrote:
> I see the issue is not related with the gripmock, instead the way you
> define your .proto file. It explicitly said Missing 'go_package' option
> in "file_1.proto".
>
> You probably find inspiration from this example file
> <
https://github.com/tokopedia/gripmock/blob/283a8f73083199ff96260ff2c5ba99b59b921add/example/multi-package/bar/bar.proto#L5
>.
> It define the go_package option.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#81 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AC26SKT6M4GEIO3UI7Z4GR3TZ7VU3ANCNFSM5AG2MREA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA34L7ESAU6TNA2HNVUP2HDT2AUKHANCNFSM5AG2MREA>
.
--
Disclaimer:
The information contained in this communication is intended
solely for the addressed individual or entity only.
If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution or taking any action in reliance on the contents of this
information is strictly prohibited and may be unlawful.
If you have
received this communication in error, please notify us immediately by
responding to this email or contact us at the address mentioned above.
|
it actually related with #65 |
We use gripmock with multiple package import in our project's integration tests.
We had two proto files under v1_0_0 folder -
file_1.proto and file_2.proto
and this is how we were using to bring up gripmock
gripmock --stub=/drone/src/integration-tests/docker-mock/gripmock/mappings --imports=/proto /proto/v1_0_0/file_1.proto /proto/v1_0_0/file_2.proto
It use to work fine until we have a change in our proto folder structure -
file_1.proto went under v1_1_0 folder
v1_1_0/file_1.proto
and file_2 is under v1_0_0 folder
v1_0_0/file_2.proto
So, we changed the gripmock statement to following -
gripmock --stub=/drone/src/integration-tests/docker-mock/gripmock/mappings --imports=/proto /proto/v1_1_0/file_1.proto /proto/v1_0_0/file_2.proto
Since then we are unable to bring up gripmock docker container and it throws following error -
cp -r /drone/src/components/xyz/idl/abc/protobuf/grpc/* /proto
Starting GripMock
Serving stub admin on http://:4771
2021/07/09 20:41:29 WARNING: Missing 'go_package' option in "file_1.proto",
please specify it with the full Go package path as
a future release of protoc-gen-go will require this be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
2021/07/09 20:41:29 WARNING: Missing 'go_package' option in "v1_0_0/file_2.proto",
please specify it with the full Go package path as
a future release of protoc-gen-go will require this be specified.
See https://developers.google.com/protocol-buffers/docs/reference/go-generated#package for more information.
WARNING: Package "github.com/golang/protobuf/protoc-gen-go/generator" is deprecated.
A future release of golang/protobuf will delete this package,
which has long been excluded from the compatibility promise.
sed: /go/src/grpc/file_2.pb.go: No such file or directory
2021/07/09 20:41:29 Fail on sed
This is how our complete gripmock docker container definition looks like -
image: tkpd/gripmock:latest
commands:
- cp -r /drone/src/components/xyz/idl/abc/protobuf/grpc/* /proto
- mkdir /stub
- cp -r /drone/src/integration-tests/docker-mock/gripmock/mappings/* /stub
- gripmock --stub=/drone/src/integration-tests/docker-mock/gripmock/mappings --imports=/proto /proto/v1_1_0/file_1.proto /proto/v1_0_0/file_2.proto
Why is it trying to find a go package? We never had auto generated go packages in our project before folder structure change as well and it was working fine.
Could you please help?
The text was updated successfully, but these errors were encountered: