Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBJ-integration-tests fails if package or java_package matches pbj.java_package #240

Open
jsync-swirlds opened this issue Apr 5, 2024 · 0 comments

Comments

@jsync-swirlds
Copy link
Member

jsync-swirlds commented Apr 5, 2024

Description

As part of platform enabling protobuf definitions for gossip events, the package usage was cleaned up to match protobuf recommendations.
This caused pbj-integration-tests to fail because the test compiles both PBJ and protoc and assumes the packages will not match.

The result is a duplicate class error during compilation.

Steps to reproduce

  • Add platform to pbj-integration-tests as detailed in issue number 241.
  • Run a gradle build of pbj-integration-tests after setting the protobuf git package to 12473-gossiped-events.

Additional context

Partial log:

pbj-integration-tests/build/generated/source/proto/main/java/com/hedera/hapi/platform/event/EventPayload.java:19: error: duplicate class: com.hedera.hapi.platform.event.EventPayload

What should happen

The build should succeed without errors. One possible solution would be to prefix the packages for pbj with pbj when compiling for the integration test only (would require an option to insert a package prefix for the compiler). Not sure if that's reasonable, but it's one option.

Related Items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant