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

Fix enum expr for enum selector #261

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Fix enum expr for enum selector #261

merged 1 commit into from
Jan 27, 2025

Conversation

goccy
Copy link
Member

@goccy goccy commented Jan 27, 2025

Fix code generation issue when using grpc.federation.enum.select in enum {} or map { enum {} } feature.

grpc.federation.enum.select determines the enum type at runtime. The evaluation of the enum type occurs when using the def.enum.by feature or performing field binding. In all other cases, it is treated as an EnumSelector type without further processing.

Copy link

Code Metrics Report

main (a603e99) #261 (cf48ed6) +/-
Coverage 66.1% 66.2% +0.2%
Code to Test Ratio 1:0.4 1:0.4 -0.0
Test Execution Time 8m4s 8m17s +13s
Details
  |                     | main (a603e99) | #261 (cf48ed6) |  +/-  |
  |---------------------|----------------|----------------|-------|
+ | Coverage            |          66.1% |          66.2% | +0.2% |
  |   Files             |             77 |             77 |     0 |
  |   Lines             |          13129 |          13160 |   +31 |
+ |   Covered           |           8673 |           8715 |   +42 |
- | Code to Test Ratio  |          1:0.4 |          1:0.4 |  -0.0 |
  |   Code              |          40671 |          40739 |   +68 |
+ |   Test              |          15724 |          15732 |    +8 |
- | Test Execution Time |           8m4s |          8m17s |  +13s |

Code coverage of files in pull request scope (73.8% → 74.0%)

Files Coverage +/-
generator/code_generator.go 77.9% -0.4%
grpc/federation/cel.go 0.0% 0.0%
resolver/message.go 76.7% +0.6%
resolver/resolver.go 84.0% +0.5%
resolver/type_conversion.go 82.4% -1.8%
resolver/types.go 87.5% +0.8%

Reported by octocov

@goccy goccy merged commit 600ee5d into main Jan 27, 2025
4 checks passed
@goccy goccy deleted the fix-enum-selector branch January 27, 2025 10:10
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

Successfully merging this pull request may close these issues.

2 participants