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

Unresolved javax usages on 3.0 #31083

Closed
brunobat opened this issue Feb 10, 2023 · 4 comments · Fixed by #31115
Closed

Unresolved javax usages on 3.0 #31083

brunobat opened this issue Feb 10, 2023 · 4 comments · Fixed by #31115
Assignees
Labels
area/grpc gRPC area/jakarta kind/bug Something isn't working
Milestone

Comments

@brunobat
Copy link
Contributor

brunobat commented Feb 10, 2023

Describe the bug

Normal maven build without tests of main succeeds, however the intellij build for debugging purposes fails because it cannot resolve javax in the following classes:

Issue:

@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.52.1)",
    comments = "Source: health/v1/health.proto")

On generated classes at quarkus-grpc-stubs:
grpc.health.v1.HealthGrpc
io.grpc.reflection.v1alpha.ServerReflectionGrpc

Also at quarkus-ark-deployment, class io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject this annotation cannot be resolved: @org.gradle.internal.impldep.javax.inject.Inject

Expected behavior

javax usages not found and intellij is able to build

Actual behavior

intellij build fails like this:

quarkus/extensions/grpc/stubs/target/generated-sources/protobuf/grpc-java/grpc/health/v1/HealthGrpc.java:7:18
java: cannot find symbol
  symbol:   class Generated
  location: package javax.annotation

How to Reproduce?

  1. checkout
  2. debug the io.quarkus.opentelemetry.deployment.OpenTelemetrySamplerConfigTest at opentelemetry/opentelemetry-deployment

Output of uname -a or ver

Darwin ... 22.3.0 Darwin Kernel Version 22.3.0: Thu Jan 5 20:48:54 PST 2023; root:xnu-8792.81.2~2/RELEASE_ARM64_T6000 arm64

Output of java -version

OpenJDK Runtime Environment Temurin-17.0.4.1+1 (build 17.0.4.1+1)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

main

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

% mvn --version
Apache Maven 3.9.0 (9b58d2bad23a66be161c4664ef21ce219c2c8584)
Maven home:...../maven/current
Java version: 17.0.4.1, vendor: Eclipse Adoptium, runtime: ..../.sdkman/candidates/java/17.0.4.1-tem
Default locale: en_PT, platform encoding: UTF-8
OS name: "mac os x", version: "13.2", arch: "aarch64", family: "mac"

IntelliJ IDEA 2022.1.4 (Ultimate Edition)

@brunobat brunobat added the kind/bug Something isn't working label Feb 10, 2023
@gsmet
Copy link
Member

gsmet commented Feb 10, 2023

@cescoffier assigning to you for the gRPC generated stuff. I don't think what you did is broken or gone though as I was unable to build the tree without your stuff in. So that might be a corner case or an oddity.

@quarkus-bot
Copy link

quarkus-bot bot commented Feb 10, 2023

/cc @alesj (grpc), @manovotn (jakarta), @maxandersen (jakarta), @radcortez (jakarta), @Sanne (jakarta)

@cescoffier
Copy link
Member

I found the reason and I don't like it....
That stub project is using the regular protoc to generate the stub, so... no post-processing.

@paomian
Copy link

paomian commented May 4, 2023

I am upgrading quarkus from 2.16 to 3.0
and i got the same issue in 3.0.1.Final.
generating Java files from proto with protobuf-maven-plugin

@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.51.1)",
    comments = "Source: exapmle.proto")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/grpc gRPC area/jakarta kind/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants