[
https://issues.apache.org/jira/browse/BEAM-10402?focusedWorklogId=503999&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-503999
]
ASF GitHub Bot logged work on BEAM-10402:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 23/Oct/20 04:27
Start Date: 23/Oct/20 04:27
Worklog Time Spent: 10m
Work Description: kennknowles commented on pull request #13134:
URL: https://github.com/apache/beam/pull/13134#issuecomment-714902272
Great ideas.
I learned a bit from:
-
https://stackoverflow.com/questions/20929176/how-can-i-find-modified-lines-that-match-a-certain-pattern-with-git
-
https://stackoverflow.com/questions/36932309/how-do-i-git-add-only-lines-matching-a-pattern
-
https://stackoverflow.com/questions/13955390/git-grep-but-restricted-to-new-or-modified-files-in-the-index
- https://stackoverflow.com/questions/1751397/git-grep-cached
In particular, I did not know about `git grep` or `git diff-index` at all.
Now I do, I guess? I never did figure out exactly how to do what you suggest in
one go. Perhaps the best way to check that I got it is to separate PRs...
The enabling (somewhat of a leap of faith?) which I will later `rebase -i`
to come after the rest.
```
git reset HEAD^
git status | grep build.gradle | cut -d : -f 2 | xargs git add
git commit -m 'Enable checkerframework globally'
```
I figured out I could commit everything that wasn't a new suppression
(interactively, somewhat tedious but far less than 2k files)
```
git add -p $(git diff-index -G ' .*Nullable.*' HEAD | cut -d ' ' -f 5 | cut
-f 2)
```
And the API surface checks all include a new line of `pruningPattern`
```
git diff-index -SpruningPattern HEAD
```
(needed to tweak interactively)
```
git commit -m 'Allow checkerframework on API surfaces'
```
Confirmation that the only things remaining are suppressions at the top
level:
```
git diff -U0 | grep '^[+][^+]' | grep -v '@SuppressWarnings'
```
(oops there were a few more, which I isolated and committed)
----------------------------------------------------------------
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: 503999)
Time Spent: 4h 20m (was: 4h 10m)
> [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: 4h 20m
> 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)