Skip to content

[Bug] Build fails with validate.proto #70

@pouriapirz

Description

@pouriapirz

Description

I am trying to use proto validate files in my Java project by adding/importing them via protoc-jar-maven-plugin plugin with protobuf version of 3.24.4. However, the build fails when gettin to compiling validate.proto with the below error:

[ERROR] /Users/<full path to files>/src/main/protobuf/protobuf/third_party/buf/validate/validate.proto [41:0]: F1127 09:41:56.086052       1 file.cc:153] Check failed: CollectExtensions(*dynamic_file_proto, extensions) 
Find unknown fields in FileDescriptorProto when building buf/validate/validate.proto. It's likely that those fields are custom options, however, those options cannot be recognized in the builder pool. 
This normally should not happen. Please report a bug.
[ERROR] /Users/<full path to files>/src/main/protobuf/protobuf/third_party/buf/validate/validate.proto [0:0]: *** Check failure stack trace: ***
[...]

Steps to Reproduce

  1. Create a Java/Maven project and add expression.proto, validate.proto and private.proto under proto files.
  2. Modify pom.xml file and add protoc-jar-maven-plugin plugin with proper input and include directories to import above files.
  3. Try building the project via mvn clean package

Expected Behavior

Build passes by compiling above 3 files successfully.

Actual Behavior

Build fails with the error described in the "Description" section above.

Environment

  • Operating System: macOS
  • Version: Ventura 13.2
  • Protobuf Compiler & Version: 3.24.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions