Skip to content

compiler: Use fully qualified String in codegen#10321

Merged
larry-safran merged 1 commit intogrpc:masterfrom
pkwarren:pkw/issue-10316
Jun 29, 2023
Merged

compiler: Use fully qualified String in codegen#10321
larry-safran merged 1 commit intogrpc:masterfrom
pkwarren:pkw/issue-10316

Conversation

@pkwarren
Copy link
Contributor

Currently, the gRPC compiler isn't properly using the fully qualified string name java.lang.String instead of String. Update the generator to use the $String$ alias to avoid compile issues with protobuf messages called String.

Fixes #10316.

Copy link
Contributor Author

@pkwarren pkwarren left a comment

Choose a reason for hiding this comment

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

I noticed this when building on arm64 debian bookworm (latest stable release). Otherwise tests are passing.

> Task :grpc-compiler:checkArtifacts FAILED

Checking format of build/artifacts/java_plugin/protoc-gen-grpc-java.exe
Format=elf64-littleaarch64
Assertion failed:  "elf64-littleaarch64" == "elf64-little"
File "check-artifact.sh", line 63

Currently, the gRPC compiler isn't properly using the fully qualified
string name `java.lang.String` instead of `String`. Update the generator
to use the `$String$` alias to avoid compile issues with protobuf
messages called String.

Fixes #10316.
@pkwarren
Copy link
Contributor Author

@ejona86 - Are you able to review this change? Thanks for helping me get it complied.

@ejona86 ejona86 requested a review from larry-safran June 29, 2023 13:42
@ejona86 ejona86 added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 29, 2023
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Jun 29, 2023
@larry-safran larry-safran merged commit 3808e70 into grpc:master Jun 29, 2023
@pkwarren
Copy link
Contributor Author

@larry-safran / @ejona86 - I noticed one of the kokoro builds was failing on Android. It appears that those generated files need to be regenerated as well. I was building with -PskipAndroid=true because I couldn't get both Android + Codegen to build on any variation of MacOS arm64 / Linux arm64 after lots of effort.

I was going to raise a PR which manually fixed those, but if one of you have a fully working build environment, can you check those in? Thanks!

@pkwarren pkwarren deleted the pkw/issue-10316 branch June 29, 2023 18:12
@ejona86
Copy link
Member

ejona86 commented Jun 29, 2023

I'll fix it.

temawi pushed a commit to temawi/grpc-java that referenced this pull request Jun 29, 2023
Currently, the gRPC compiler isn't properly using the fully qualified
string name `java.lang.String` instead of `String`. Update the generator
to use the `$String$` alias to avoid compile issues with protobuf
messages called String.

Fixes grpc#10316.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gRPC Java compiler isn't using fully qualified names for String

4 participants