You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "mimaison (via GitHub)" <gi...@apache.org> on 2024/07/12 08:10:49 UTC

[PR] MINOR: Don't include checker-qual in distribution [kafka]

mimaison opened a new pull request, #16578:
URL: https://github.com/apache/kafka/pull/16578

   checker-qual is only used at compile time, we should not ship it as part of our distribution
   
   
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on PR #16578:
URL: https://github.com/apache/kafka/pull/16578#issuecomment-2226841455

   > When reasonable, please use the latest release.
   
   @ben-manes , thanks for the suggestion. But since we're still supporting jdk8, we can't upgrade to 3.x version.


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on PR #16578:
URL: https://github.com/apache/kafka/pull/16578#issuecomment-2225265037

   Here's another explanation from the author of Caffeine: https://github.com/ben-manes/caffeine/issues/474#issuecomment-728243942 . I think it's safe to exclude them for us.


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "mimaison (via GitHub)" <gi...@apache.org>.
mimaison merged PR #16578:
URL: https://github.com/apache/kafka/pull/16578


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on PR #16578:
URL: https://github.com/apache/kafka/pull/16578#issuecomment-2225411275

   > I tried removing `error_prone_annotations` using:
   > 
   > ```
   > implementation(libs.caffeine) {
   >       exclude group: 'org.checkerframework', module: 'checker-qual'
   >       exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
   > }
   > ```
   > 
   > but then compilation is failing:
   > 
   > ```
   > > Task :storage:compileJava
   > /Users/mickael/.gradle/caches/modules-2/files-2.1/com.github.ben-manes.caffeine/caffeine/2.9.3/b162491f768824d21487551873f9b3b374a7fe19/caffeine-2.9.3.jar(/com/github/benmanes/caffeine/cache/Cache.class): warning: Cannot find annotation method 'value()' in type 'CompatibleWith': class file for com.google.errorprone.annotations.CompatibleWith not found
   > /Users/mickael/.gradle/caches/modules-2/files-2.1/com.github.ben-manes.caffeine/caffeine/2.9.3/b162491f768824d21487551873f9b3b374a7fe19/caffeine-2.9.3.jar(/com/github/benmanes/caffeine/cache/Cache.class): warning: Cannot find annotation method 'value()' in type 'CompatibleWith'
   > error: warnings found and -Werror specified
   > /Users/mickael/.gradle/caches/modules-2/files-2.1/com.github.ben-manes.caffeine/caffeine/2.9.3/b162491f768824d21487551873f9b3b374a7fe19/caffeine-2.9.3.jar(/com/github/benmanes/caffeine/cache/Policy.class): warning: Cannot find annotation method 'value()' in type 'CompatibleWith'
   > ```
   > 
   > I've got to admit I've not looked into it further and decided to just remove `checker-qual`.
   
   Hmm... I guess it is because we're using 2.x of Caffeine, not 3.x. OK, let's exclude `checker-qual` only.


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "mimaison (via GitHub)" <gi...@apache.org>.
mimaison commented on PR #16578:
URL: https://github.com/apache/kafka/pull/16578#issuecomment-2228800583

   Test failures are not related, merging to trunk


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "mimaison (via GitHub)" <gi...@apache.org>.
mimaison commented on PR #16578:
URL: https://github.com/apache/kafka/pull/16578#issuecomment-2225314074

   I tried removing `error_prone_annotations` but then compilation is failing:
   ```
   > Task :storage:compileJava
   /Users/mickael/.gradle/caches/modules-2/files-2.1/com.github.ben-manes.caffeine/caffeine/2.9.3/b162491f768824d21487551873f9b3b374a7fe19/caffeine-2.9.3.jar(/com/github/benmanes/caffeine/cache/Cache.class): warning: Cannot find annotation method 'value()' in type 'CompatibleWith': class file for com.google.errorprone.annotations.CompatibleWith not found
   /Users/mickael/.gradle/caches/modules-2/files-2.1/com.github.ben-manes.caffeine/caffeine/2.9.3/b162491f768824d21487551873f9b3b374a7fe19/caffeine-2.9.3.jar(/com/github/benmanes/caffeine/cache/Cache.class): warning: Cannot find annotation method 'value()' in type 'CompatibleWith'
   error: warnings found and -Werror specified
   /Users/mickael/.gradle/caches/modules-2/files-2.1/com.github.ben-manes.caffeine/caffeine/2.9.3/b162491f768824d21487551873f9b3b374a7fe19/caffeine-2.9.3.jar(/com/github/benmanes/caffeine/cache/Policy.class): warning: Cannot find annotation method 'value()' in type 'CompatibleWith'
   ```
   
   I've got to admit I've not looked into it further and decided to just remove `checker-qual`.


-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "showuon (via GitHub)" <gi...@apache.org>.
showuon commented on code in PR #16578:
URL: https://github.com/apache/kafka/pull/16578#discussion_r1676569443


##########
build.gradle:
##########
@@ -1931,7 +1931,9 @@ project(':storage') {
     implementation project(':storage:storage-api')
     implementation project(':server-common')
     implementation project(':clients')
-    implementation libs.caffeine
+    implementation(libs.caffeine) {
+      exclude group: 'org.checkerframework', module: 'checker-qual'

Review Comment:
   @chia7712 , we've discussed `error_prone_annotations` above. In short, it'll fail compilation if exclude it.



-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #16578:
URL: https://github.com/apache/kafka/pull/16578#discussion_r1676473617


##########
build.gradle:
##########
@@ -1931,7 +1931,9 @@ project(':storage') {
     implementation project(':storage:storage-api')
     implementation project(':server-common')
     implementation project(':clients')
-    implementation libs.caffeine
+    implementation(libs.caffeine) {
+      exclude group: 'org.checkerframework', module: 'checker-qual'

Review Comment:
   It seems `error_prone_annotations` is used in compile time, right? If so, should it be excluded too?



-- 
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: jira-unsubscribe@kafka.apache.org

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


Re: [PR] MINOR: Don't include checker-qual in distribution [kafka]

Posted by "ben-manes (via GitHub)" <gi...@apache.org>.
ben-manes commented on PR #16578:
URL: https://github.com/apache/kafka/pull/16578#issuecomment-2226764528

   > warning: Cannot find annotation method 'value()' in type 'CompatibleWith'
   
   You could use `-Xlint:-processing` to disable that warning. There isn't any targeted way to suppress it that I am aware of, and experience it as well due to dependencies excluding annotations that javac wants. For example when JMH creates its fat jar then Apache's Jackrabbit relocation of Guava emits this warning due to them not relocating the annotations along with it. It's about potentially missing classes for compile-time annotation processors, which if fair if they would query for it but is not useful otherwise. It would be nice if javac could allow more targeted suppressions to avoid disabling the entire category.


-- 
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: jira-unsubscribe@kafka.apache.org

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