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

Why imports are not enough to define code generation? #117

Open
rbroggi opened this issue Jun 20, 2022 · 0 comments
Open

Why imports are not enough to define code generation? #117

rbroggi opened this issue Jun 20, 2022 · 0 comments

Comments

@rbroggi
Copy link

rbroggi commented Jun 20, 2022

In a project where you have inter/intra package dependencies, I find it strange and redundant the fact that we need to specify all the protos to gripmock even after providing the --imports flag.

Let's take the multi-package example:

We have the following dependencies:

  1. hello.proto -> bar/bar.proto
  2. hello.proto -> foo.proto

Those dependencies are already explicit in the hello.proto through the import statements and having to re-state all the *.proto that are present in the dependency graph sounds like redundant and not scalable:

gripmock --stub=example/multi-package/stub --imports=example/multi-package/ \
  example/multi-package/foo.proto example/multi-package/hello.proto \
  example/multi-package/bar/bar.proto &

I would expect to have something more similar to:

gripmock --stub=example/multi-package/stub --imports=example/multi-package/ example/multi-package/hello.proto 

this thing becomes especially critical if the underlying dependency graph grows a lot.

WDYT?

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

No branches or pull requests

1 participant