Hello, I found a bug in the pact protobuf plugin w...
# protobufs
r
Hello, I found a bug in the pact protobuf plugin where it errors out like so:
Copy code
Protobuf enum value .some.package.ENUM has no value ENUM_VALUE
The issue occurs if there are multiple top-level enums with the same package name across different files. The good news is I have a pull-request fix for this. As a process question - Should I just create a PR or do I need to file an issue as well? The technical reason is that in utils.rs, it only calls
find_enum_by_name_in_message
on the first message that matches the package name. In my case I have multiple of these, so the
find_enum_by_name
method returns None. The solution is to iterate through each of the messages that have the matching package and call
find_enum_by_name_in_message
for each of those.
y
blobwave No prescribed way but if its a bug I’d normally raise an issue first, and link to a pull request that proposes a fix for said bug. Either way you get the change in front of people, is good for collabing, if it needs anything additional, it can always be added retrospectively!
r
Wonderful thanks, ill throw some tests in and make a PR + an issue shortly.
PR is up! Would love someone to provide feedback 🙏 https://github.com/pactflow/pact-protobuf-plugin/issues/30
thankyou 1
m
Awesome, thanks!