Kong / Kong/insomnia

gRPC import directory doesn't work as expected

Open
#4,038 4 comments 11 reactions 1 assignee Claimed by @ryan-willis View on GitHub
A-grpc B-bug S-verified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for a bug that matches the one I want to file, without success.

### Insomnia Version

2021.5.3

### What operating system are you using?

macOS

### Operating System Version

macOS Big Sur 11.6

### Installation method

homebrew

### Last Known Working Insomnia version

2021.5.3

### Expected Behavior

Let's consider this proto hierarchy:

```
protos/
common/
common.proto
microservicea/
common.proto (include common/common.proto)
a.proto (include common.proto)
microserviceb/
common.proto (include common/common.proto)
b.proto (include common.proto)
```

I would like to be able to import my protos without issues.

### Actual Behavior

Currently, when you Add Directory, in my case `protos`, it adds all proto files recursively. This is not what I expect / would like as it leads to a behaviour I can't fix as `a.proto` will be loaded, trying to include `common.proto`, except `protos/microservicea` was not added to import directory. It fails.

In Go and TS, we generate protos for each micro service including:
- root directory path (aka `protos`) , but it doesn't import recursively protos
- micro service path (aka `protos/microservicea`)

### Reproduction Steps

See description in Expected behaviour to reproduce the issue.

### Additional Information

Maybe a "Add Import Directory" (adding include path without importing protos) could solve the issue

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.