You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/01/28 01:12:16 UTC
[GitHub] [geode] Bill opened a new pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Bill opened a new pull request #5967:
URL: https://github.com/apache/geode/pull/5967
[GEODE-8882](https://issues.apache.org/jira/browse/GEODE-8882)
- [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
- [x] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
- [x] Is your initial contribution a single, squashed commit?
- [x] Does `gradlew build` run cleanly?
- [ ] Have you written or updated unit tests to verify your changes?
- [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] pivotal-jbarrett commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
pivotal-jbarrett commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566412611
##########
File path: boms/geode-all-bom/src/test/resources/expected-pom.xml
##########
@@ -877,6 +877,12 @@
<version>2.4.1</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.jetbrains</groupId>
+ <artifactId>annotations</artifactId>
+ <version>20.1.0</version>
+ <scope>compile</scope>
Review comment:
sort of... compile scoped with optional true.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] onichols-pivotal commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
onichols-pivotal commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r565907930
##########
File path: geode-common/build.gradle
##########
@@ -26,6 +26,7 @@ dependencies {
implementation(platform(project(':boms:geode-all-bom')))
implementation('com.fasterxml.jackson.core:jackson-databind')
+ api('org.jetbrains:annotations')
Review comment:
https://github.com/JetBrains/java-annotations suggests `compileOnly` rather than `api` ... is the intent to ship jetbrains annotations .jar with Geode, or use it only at compile time? I could see arguments either way (or maybe for technical reasons we don't actually have a choice?), just want to be sure we get the right scope because scopes are tricky. @rhoughton-pivot any thoughts?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] Bill merged pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
Bill merged pull request #5967:
URL: https://github.com/apache/geode/pull/5967
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] pivotal-jbarrett commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
pivotal-jbarrett commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566394048
##########
File path: boms/geode-all-bom/src/test/resources/expected-pom.xml
##########
@@ -877,6 +877,12 @@
<version>2.4.1</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.jetbrains</groupId>
+ <artifactId>annotations</artifactId>
+ <version>20.1.0</version>
+ <scope>compile</scope>
Review comment:
The seems off. I would expect the default scope for this type to be `compileOnly`, though I don't think it really matters much in a bom.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] pivotal-jbarrett commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
pivotal-jbarrett commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566393323
##########
File path: buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
##########
@@ -272,5 +272,10 @@ class DependencyConstraints implements Plugin<Project> {
dependencySet(group: 'org.springframework.session', version: '2.4.1') {
entry('spring-session-data-redis')
}
+
Review comment:
Flip a coin...
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] Bill commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
Bill commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566405515
##########
File path: boms/geode-all-bom/src/test/resources/expected-pom.xml
##########
@@ -877,6 +877,12 @@
<version>2.4.1</version>
<scope>compile</scope>
</dependency>
+ <dependency>
+ <groupId>org.jetbrains</groupId>
+ <artifactId>annotations</artifactId>
+ <version>20.1.0</version>
+ <scope>compile</scope>
Review comment:
is there any such thing as a `compileOnly` scope for a Maven project?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] Bill commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
Bill commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566386202
##########
File path: buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
##########
@@ -272,5 +272,10 @@ class DependencyConstraints implements Plugin<Project> {
dependencySet(group: 'org.springframework.session', version: '2.4.1') {
entry('spring-session-data-redis')
}
+
Review comment:
@pivotal-jbarrett asked explicitly for this syntax. I don't have an opinion on 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] Bill commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
Bill commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566389048
##########
File path: geode-common/build.gradle
##########
@@ -26,6 +26,7 @@ dependencies {
implementation(platform(project(':boms:geode-all-bom')))
implementation('com.fasterxml.jackson.core:jackson-databind')
+ api('org.jetbrains:annotations')
Review comment:
I'm calling this resolved. I gave up trying to make the compile-time dependency global since it seems kinda harder than it's worth.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] pivotal-jbarrett commented on pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
pivotal-jbarrett commented on pull request #5967:
URL: https://github.com/apache/geode/pull/5967#issuecomment-768767322
Awesome! Not only did it find a bug but that there was no test coverage for that case. Can you fix both issue in this PR?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] Bill commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
Bill commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566366660
##########
File path: geode-common/build.gradle
##########
@@ -26,6 +26,7 @@ dependencies {
implementation(platform(project(':boms:geode-all-bom')))
implementation('com.fasterxml.jackson.core:jackson-databind')
+ api('org.jetbrains:annotations')
Review comment:
I want to introduce a compile-time dependency on `annotation`, in any subproject that depends on `geode-common`, because I want to save my colleagues from having to add an explicit dependency on `annotation` to the `build.gradle` for each subproject, as they desire to add a `@NotNull` annotation in some new place.
I tried changing this to `compileOnly('org.jetbrains:annotations')` but now the compiler/IDE says `java: package org.jetbrains.annotations does not exist` where I'm trying to import it over in `SocketMessageWriter.java` in `geode-core`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] pivotal-jbarrett commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
pivotal-jbarrett commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566160915
##########
File path: geode-common/build.gradle
##########
@@ -26,6 +26,7 @@ dependencies {
implementation(platform(project(':boms:geode-all-bom')))
implementation('com.fasterxml.jackson.core:jackson-databind')
+ api('org.jetbrains:annotations')
Review comment:
I concur, it should be compileOnly.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] rhoughton-pivot commented on a change in pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
rhoughton-pivot commented on a change in pull request #5967:
URL: https://github.com/apache/geode/pull/5967#discussion_r566375472
##########
File path: buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
##########
@@ -272,5 +272,10 @@ class DependencyConstraints implements Plugin<Project> {
dependencySet(group: 'org.springframework.session', version: '2.4.1') {
entry('spring-session-data-redis')
}
+
Review comment:
Are we expecting to have more modules from `org.jetbrains` in the product? If not, then the syntax above for individual modules is a little cleaner.
##########
File path: geode-common/build.gradle
##########
@@ -26,6 +26,7 @@ dependencies {
implementation(platform(project(':boms:geode-all-bom')))
implementation('com.fasterxml.jackson.core:jackson-databind')
+ api('org.jetbrains:annotations')
Review comment:
@kohlmu-pivotal wanted the same thing: to have a java project or .gradle file, whose only goal was to make it easy for other Geode subprojects to get dependencies. Maybe he found a solution?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [geode] Bill commented on pull request #5967: GEODE-8882: Enable JetBrains NotNull Annotation
Posted by GitBox <gi...@apache.org>.
Bill commented on pull request #5967:
URL: https://github.com/apache/geode/pull/5967#issuecomment-769366977
I gave up on trying to make the compile-time dependency on JetBrains annotations global within Geode and simply added the compile-time dependency directly to `geode-core`. Others that wish to use the `@NotNull` annotation in other Geode subprojects can follow the example.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org