Skip to content

Fix Empty return type in triple generator#16324

Open
gaoxiaolei-s59 wants to merge 3 commits into
apache:3.3from
gaoxiaolei-s59:codex/fix-empty-return-type
Open

Fix Empty return type in triple generator#16324
gaoxiaolei-s59 wants to merge 3 commits into
apache:3.3from
gaoxiaolei-s59:codex/fix-empty-return-type

Conversation

@gaoxiaolei-s59

Copy link
Copy Markdown

What is the purpose of the change

Fix the Dubbo3 Triple generator output for unary methods whose response type is google.protobuf.Empty. The generated synchronous Java method now uses void, while descriptor, parser, async, and StreamObserver paths keep using com.google.protobuf.Empty.

Fixes #15629

Brief changelog

  • Map google.protobuf.Empty to com.google.protobuf.Empty in generator type context.
  • Split unary synchronous return type from protobuf wire output type.
  • Add Triple generator coverage for Empty responses.

Verifying this change

  • ./mvnw -pl dubbo-plugin/dubbo-compiler test

@codecov-commenter

codecov-commenter commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 61.04%. Comparing base (ed0e11e) to head (675e87c).

Files with missing lines Patch % Lines
...n/java/org/apache/dubbo/gen/AbstractGenerator.java 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.3   #16324      +/-   ##
============================================
+ Coverage     60.86%   61.04%   +0.18%     
+ Complexity    11768    11767       -1     
============================================
  Files          1953     1953              
  Lines         89260    89269       +9     
  Branches      13471    13473       +2     
============================================
+ Hits          54329    54498     +169     
+ Misses        29350    29156     -194     
- Partials       5581     5615      +34     
Flag Coverage Δ
integration-tests-java21 32.09% <0.00%> (+<0.01%) ⬆️
integration-tests-java8 32.15% <0.00%> (-0.06%) ⬇️
samples-tests-java21 32.16% <0.00%> (+0.01%) ⬆️
samples-tests-java8 29.79% <0.00%> (-0.05%) ⬇️
unit-tests-java11 59.29% <90.90%> (+0.20%) ⬆️
unit-tests-java17 58.74% <90.90%> (+0.16%) ⬆️
unit-tests-java21 58.75% <90.90%> (+0.19%) ⬆️
unit-tests-java25 58.74% <90.90%> (+0.20%) ⬆️
unit-tests-java8 59.28% <87.50%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gaoxiaolei-s59 gaoxiaolei-s59 force-pushed the codex/fix-empty-return-type branch from dc45bda to f5889a1 Compare June 9, 2026 03:05
@zrlw

zrlw commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@heliang666s PTAL

@zrlw zrlw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] dubbo-maven-pluggin cannot successfully compile google.protobuf.Empty into 'void' keyword

3 participants