Skip to content

[πŸ’‘ FEATURE REQUEST]: Recursive grpc.proto glob wildcardsΒ #2220

@rela589n

Description

@rela589n

Plugin

GRPC

I have an idea!

The current grpc.proto configuration supports wildcards (implemented in roadrunner-server/grpc#90):

proto:
    - "src/Support/Contracts/*.proto"

This will match src/Support/Contracts/any.proto, but it will not match nested src/Support/Contracts/not/any.proto.

My fist suggestion is to enable recursive glob matching with what's called globstar **:

proto:
    - "src/Support/Contracts/**/*.proto"

This would match any .proto file in any descendants of Contracts directory.

Another option I would want to suggest is "glob brace":

proto:
    - "src/Support/Contracts/{*suffix.proto,*another.proto}"

It allows to use alternation of the patterns. For example, a_suffix.proto, b_suffix.proto, an_another.proto would be matched to the pattern, but foo.proto wouldn't.

In PHP's glob() function, it's be enabled by GLOB_BRACE.

Metadata

Metadata

Assignees

Labels

C-feature-requestCategory: feature requested, but need to be discussedhelp-heeded-mediumCall for participation: Experience needed to fix: Medium / intermediate

Projects

Status

πŸ“‹ Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions