You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jamesnetherton (via GitHub)" <gi...@apache.org> on 2023/08/10 08:18:14 UTC

[GitHub] [camel-quarkus] jamesnetherton opened a new issue, #5167: Compilation fails for gRPC applications in dev mode

jamesnetherton opened a new issue, #5167:
URL: https://github.com/apache/camel-quarkus/issues/5167

   ### Bug description
   
   I finally realize why Quarkus does not exclude Findbugs in `grpc-common`.  Seems gRPC has a number of occurrences of `javax.annotation.CheckReturnValue`:
   
   https://github.com/search?q=repo%3Agrpc%2Fgrpc-java+CheckReturnValue&type=code&p=1
   
   Which results in the following compilation error because we are excluding findbugs here:
   
   https://github.com/apache/camel-quarkus/blob/main/extensions/grpc/runtime/pom.xml#L41-L45
   
   Seems to not occur outside of dev mode though.
   
   ```
   [INFO] -------------------------------------------------------------
   [ERROR] COMPILATION ERROR : 
   [INFO] -------------------------------------------------------------
   [ERROR] cannot access javax.annotation.CheckReturnValue
     class file for javax.annotation.CheckReturnValue not found
   [INFO] 1 error
   [INFO] -------------------------------------------------------------
   ```
   
   The simplest fix would be to remove the Findbugs exclusion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ppalaga commented on issue #5167: Compilation fails for gRPC applications in dev mode

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on issue #5167:
URL: https://github.com/apache/camel-quarkus/issues/5167#issuecomment-1672971337

   Yeah, I also recollect gRPC was a special about findbugs.
   
   We could try to redefine the rules in this module, something like
   
   ```
                       <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-enforcer-plugin</artifactId>
                           <dependencies>
                               <dependency>
                                   <groupId>io.quarkus</groupId>
                                   <artifactId>quarkus-enforcer-rules</artifactId>
                                   <version>${quarkus.version}</version>
                               </dependency>
                               <dependency>
                                   <groupId>org.l2x6.cq</groupId>
                                   <artifactId>cq-filtered-external-enforcer-rules</artifactId>
                                   <version>${cq-plugin.version}</version>
                               </dependency>
                           </dependencies>
                           <executions>
                               <execution>
                                   <id>camel-quarkus-enforcer-rules</id>
                                   <goals>
                                       <goal>enforce</goal>
                                   </goals>
                                   <configuration>
                                       <rules>
                                           <requireJavaVersion>
                                               <version>11</version>
                                           </requireJavaVersion>
                                           <dependencyConvergence />
                                           <filteredExternalRules>
                                               <location>classpath:enforcer-rules/quarkus-require-maven-version.xml</location>
                                           </filteredExternalRules>
                                           <filteredExternalRules>
                                               <location>classpath:enforcer-rules/quarkus-banned-dependencies.xml</location>
                                               <xsltLocation>${maven.multiModuleProjectDirectory}/tooling/enforcer-rules/quarkus-banned-dependencies.xsl</xsltLocation>
                                           </filteredExternalRules>
                                           <filteredExternalRules>
                                               <location>${maven.multiModuleProjectDirectory}/tooling/enforcer-rules/camel-quarkus-banned-dependencies.xml</location>
   <!-- Exclude findbugs in this module -->
                                               <xsltLocation>${maven.multiModuleProjectDirectory}/tooling/enforcer-rules/exclude-findbugs.xsl</xsltLocation>
                                           </filteredExternalRules>
                                           <filteredExternalRules>
                                               <location>${maven.multiModuleProjectDirectory}/tooling/enforcer-rules/camel-quarkus-banned-dependencies-spring.xml</location>
                                           </filteredExternalRules>
                                       </rules>
                                   </configuration>
                               </execution>
                           </executions>
                       </plugin>
   ``` 
   
   where `tooling/enforcer-rules/exclude-findbugs.xsl` could be adapted from the existing `tooling/enforcer-rules/quarkus-banned-dependencies.xsl`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton closed issue #5167: Compilation fails for gRPC applications in dev mode

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton closed issue #5167: Compilation fails for gRPC applications in dev mode 
URL: https://github.com/apache/camel-quarkus/issues/5167


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] ppalaga commented on issue #5167: Compilation fails for gRPC applications in dev mode

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on issue #5167:
URL: https://github.com/apache/camel-quarkus/issues/5167#issuecomment-1672975098

   It's actually "allow findbugs" rather than "exclude findbugs"


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-quarkus] jamesnetherton commented on issue #5167: Compilation fails for gRPC applications in dev mode

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #5167:
URL: https://github.com/apache/camel-quarkus/issues/5167#issuecomment-1672783440

   @ppalaga Is there any way of ignoring the dependency ban for Findbugs exclusively in the `grpc/runtime` module? Or would the ban have to be removed globally (maybe undesirable)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org