[
https://issues.apache.org/jira/browse/BEAM-10402?focusedWorklogId=504328&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-504328
]
ASF GitHub Bot logged work on BEAM-10402:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Oct/20 21:20
Start Date: 23/Oct/20 21:20
Worklog Time Spent: 10m
Work Description: kennknowles commented on a change in pull request
#13134:
URL: https://github.com/apache/beam/pull/13134#discussion_r511153453
##########
File path: examples/java/build.gradle
##########
@@ -21,7 +21,7 @@ import groovy.json.JsonOutput
plugins { id 'org.apache.beam.module' }
applyJavaNature(
exportJavadoc: false,
- enableChecker: false,
+
Review comment:
Noting that we don't apply spotless to the groovy files but we can and
it should clean up these blanks and the indentation inconsistencies etc.
##########
File path: sdks/java/extensions/protobuf/build.gradle
##########
@@ -18,8 +18,13 @@
plugins { id 'org.apache.beam.module' }
applyJavaNature(
- enableChecker: false,
ignoreRawtypeErrors: true,
+ generatedClassPatterns: [
+
'^org\\.apache\\.beam\\.sdk\\.extensions\\.protobuf\\.Proto2CoderTestMessages',
+
'^org\\.apache\\.beam\\.sdk\\.extensions\\.protobuf\\.Proto2SchemaMessages',
+
'^org\\.apache\\.beam\\.sdk\\.extensions\\.protobuf\\.Proto3SchemaMessages',
+ '^org\\.apache\\.beam\\.sdk\\.extensions\\.protobuf\\.Proto3SchemaOptions',
Review comment:
Didn't know about slashy strings. Nice. Done.
##########
File path:
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
##########
@@ -726,11 +729,15 @@ class BeamModulePlugin implements Plugin<Project> {
options.encoding = "UTF-8"
// As we want to add '-Xlint:-deprecation' we intentionally remove
'-Xlint:deprecation' from compilerArgs here,
// as intellij is adding this, see
https://youtrack.jetbrains.com/issue/IDEA-196615
- options.compilerArgs -= ["-Xlint:deprecation"]
+ options.compilerArgs -= [
+ "-Xlint:deprecation",
+ ]
options.compilerArgs += ([
'-parameters',
'-Xlint:all',
- '-Werror'
+ '-Werror',
+ '-Xmaxerrs',
+ '10000'
Review comment:
I did this so that it would expose all the errors and I could grep the
log to pass the right files through `sed`. Presumably in mostly-functioning
code you would be at 0 or a handful anyhow so the number doesn't matter. But
I'll remove it because might as well leave it at default.
##########
File path:
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
##########
@@ -1646,8 +1656,10 @@ class BeamModulePlugin implements Plugin<Project> {
project.ext.applyJavaNature(
exportJavadoc: false,
enableSpotbugs: false,
- enableChecker: false,
publish: configuration.publish,
+ generatedClassPatterns: [
+ '^org\\.apache\\.beam\\..*'
+ ],
Review comment:
Yea. I could be `.model` except it is also used by the windmill proto
generation. I have changed it so that it is passed in and the default is the
model.
##########
File path: sdks/java/extensions/sql/hcatalog/build.gradle
##########
@@ -18,7 +18,12 @@
plugins { id 'org.apache.beam.module' }
-applyJavaNature(enableChecker:false,automaticModuleName:
'org.apache.beam.sdk.extensions.sql.meta.provider.hcatalog')
+applyJavaNature(
+ automaticModuleName:
'org.apache.beam.sdk.extensions.sql.meta.provider.hcatalog',
+ classesTriggerCheckerBugs: [
+ 'HCatalogTable': '',
Review comment:
Done
##########
File path: sdks/java/io/kudu/build.gradle
##########
@@ -18,8 +18,12 @@
plugins { id 'org.apache.beam.module' }
applyJavaNature(
- enableChecker: false,
+
ignoreRawtypeErrors:true,
+ classesTriggerCheckerBugs: [
+ 'KuduTestUtils': '',
+ 'KuduIOIT': '',
Review comment:
Done
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 504328)
Time Spent: 6h (was: 5h 50m)
> [Umbrella] Eliminate nullability errors from Beam Java
> ------------------------------------------------------
>
> Key: BEAM-10402
> URL: https://issues.apache.org/jira/browse/BEAM-10402
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Reporter: Kenneth Knowles
> Priority: P1
> Labels: Clarified, starter
> Time Spent: 6h
> Remaining Estimate: 0h
>
> I enabled the checker framework and the core SDK exceeds 100 nullability
> errors immediately. We should make this number zero, since nullability errors
> are solved problem in computer science and they do periodically impact Beam.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)