console icon indicating copy to clipboard operation
console copied to clipboard

Protobuf Git Config: BaseDirectory & Depth

Open MaxBoeh opened this issue 3 years ago • 3 comments

We are using the protobuf-git configuration as described at https://cloudhut.dev/docs/features/protobuf#git-repository In our repository the proto-files live within a proto directory, which seems to be very common, and contains 5 levels of nested folders.

Currently KOWL searches only the first 5 levels of the checkout for .proto files, so our last level is not considered.

  • Please add a BaseDirectory config property within protobuf.git.repository config, similar to the other git-based configurations. (I've overlooked, that this is already done and only the release is pending)
  • Please make the 5 levels of folders searched for .proto files configurable.

Thank you very much!

MaxBoeh avatar Nov 04 '21 12:11 MaxBoeh

Hi @MaxBoeh , you are right it already exists, but as far as I can see it's not yet documented.

Do you want to submit a PR for your request of making the maxDepth configurable?

weeco avatar Nov 06 '21 11:11 weeco

Hi @weeco,

As I've never wrote a single line of Go, I don't feel like I'm the right person to participate in this one.

However I've found some details while considering participating:

  • When loading proto files directly from the filesystem (not via git), they seem to be loaded with infinite depth. The loading mechanic looks very similar to the code loading proto files from the git checkout.
  • The Git.Config used in Proto.Config is also used in different parts of the configuration, so it wouldn't make much sense to place a maxDepth-configuration, only responsible for proto-files, there (also it would be ambiguous with git's depth-configuration).

=> To keep an intuitive configuration, streamlining the loading behavior of proto files (using infinite depth) seems the best option to me. However I don't think I'm capable of doing this myself

MaxBoeh avatar Nov 09 '21 11:11 MaxBoeh

I'd also be glad to make the levels (depth) configurable, at least for git repositories

omeraha avatar Jun 13 '22 14:06 omeraha