Skip to content

Speed up buildWithNullAway task#1330

Merged
msridhar merged 2 commits intomasterfrom
speed-up-build-with-nullaway
Nov 6, 2025
Merged

Speed up buildWithNullAway task#1330
msridhar merged 2 commits intomasterfrom
speed-up-build-with-nullaway

Conversation

@msridhar
Copy link
Copy Markdown
Collaborator

@msridhar msridhar commented Nov 6, 2025

Disable all other Error Prone checks when building with NullAway. No functional changes.

Summary by CodeRabbit

  • Chores
    • Modified build configuration to streamline compiler validation checks, narrowing scope to NullAway error detection only.

@msridhar msridhar enabled auto-merge (squash) November 6, 2025 01:23
@msridhar msridhar requested a review from yuxincs November 6, 2025 01:23
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.43%. Comparing base (52033ec) to head (ebe9e6c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1330   +/-   ##
=========================================
  Coverage     88.43%   88.43%           
  Complexity     2566     2566           
=========================================
  Files            96       96           
  Lines          8605     8605           
  Branches       1707     1707           
=========================================
  Hits           7610     7610           
  Misses          500      500           
  Partials        495      495           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 6, 2025

Walkthrough

The buildWithNullAway Gradle task's Error Prone configuration has been modified to restrict error reporting. Error Prone checks are now disabled globally with disableAllChecks = true, while NullAway is explicitly enabled through an error directive. This change narrows the scope of reported errors to only NullAway violations, whereas previously all Error Prone checks were active during the build task.

Suggested reviewers

  • lazaroclapp
  • yuxincs

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main objective of the pull request—optimizing the buildWithNullAway task by disabling unnecessary Error Prone checks to improve build speed.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch speed-up-build-with-nullaway

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6fa9f6 and 8e8f1dd.

📒 Files selected for processing (1)
  • nullaway/build.gradle (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: msridhar
Repo: uber/NullAway PR: 1245
File: guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java:101-102
Timestamp: 2025-08-14T18:50:06.159Z
Learning: In NullAway JSpecify tests, when JDK version requirements exist due to bytecode annotation reading capabilities, prefer failing tests over skipping them on unsupported versions to ensure CI catches regressions and enforces proper JDK version usage for developers.
Learnt from: msridhar
Repo: uber/NullAway PR: 1259
File: jdk-recent-unit-tests/src/test/java/com/uber/nullaway/jdk17/SwitchTests.java:318-321
Timestamp: 2025-08-29T18:41:43.584Z
Learning: Classes annotated with NullMarked are analyzed by NullAway even if they are not in packages specified by the AnnotatedPackages configuration. The NullMarked annotation guarantees NullAway analysis.
📚 Learning: 2025-08-29T18:41:43.584Z
Learnt from: msridhar
Repo: uber/NullAway PR: 1259
File: jdk-recent-unit-tests/src/test/java/com/uber/nullaway/jdk17/SwitchTests.java:318-321
Timestamp: 2025-08-29T18:41:43.584Z
Learning: Classes annotated with NullMarked are analyzed by NullAway even if they are not in packages specified by the AnnotatedPackages configuration. The NullMarked annotation guarantees NullAway analysis.

Applied to files:

  • nullaway/build.gradle
📚 Learning: 2025-08-14T18:50:06.159Z
Learnt from: msridhar
Repo: uber/NullAway PR: 1245
File: guava-recent-unit-tests/src/test/java/com/uber/nullaway/guava/NullAwayGuavaParametricNullnessTests.java:101-102
Timestamp: 2025-08-14T18:50:06.159Z
Learning: In NullAway JSpecify tests, when JDK version requirements exist due to bytecode annotation reading capabilities, prefer failing tests over skipping them on unsupported versions to ensure CI catches regressions and enforces proper JDK version usage for developers.

Applied to files:

  • nullaway/build.gradle
📚 Learning: 2025-08-28T04:54:20.953Z
Learnt from: msridhar
Repo: uber/NullAway PR: 1248
File: nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java:847-857
Timestamp: 2025-08-28T04:54:20.953Z
Learning: In NullAway's GenericsChecks.java, NewClassTree support for explicit type argument substitution requires more extensive changes beyond just modifying the conditional in compareGenericTypeParameterNullabilityForCall. The maintainers prefer to handle NewClassTree support in a separate follow-up rather than expanding the scope of PRs focused on specific issues like super constructor calls.

Applied to files:

  • nullaway/build.gradle
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build spring-framework with snapshot
  • GitHub Check: Build and test on windows-latest
🔇 Additional comments (1)
nullaway/build.gradle (1)

169-170: Change correctly implements Error Prone's disable-then-enable pattern.

The combination of disableAllChecks = true followed by error("NullAway") maps to -XepDisableAllChecks followed by -Xep:NullAway:ERROR, which is the intended pattern to disable all Error Prone checks while selectively re-enabling NullAway. This achieves the intended build speedup without affecting NullAway validation.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@msridhar msridhar merged commit 6c78a05 into master Nov 6, 2025
11 checks passed
@msridhar msridhar deleted the speed-up-build-with-nullaway branch November 6, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants