Skip to content

Annotate javac warnings from the build job only - #100

Merged
abashev merged 1 commit into
mainfrom
javac-warnings-from-one-job
Oct 2, 2026
Merged

abashev merged 1 commit into
mainfrom
javac-warnings-from-one-job

Conversation

@abashev

@abashev abashev commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

setup-java's problem matcher turns javac's warnings, Error Prone's among them, into annotations on the diff, and it is on by default. It was on in every job that compiles the same sources: build, the three newer JDKs, the five native platforms and both CodeQL analyses. Windows never annotated, because the matcher's pattern takes no path with a colon in it.

GitHub keeps only the first ten warnings of a step. The build prints 188 of them, and as it runs in parallel, each job prints them in its own order and keeps its own ten. That is why on #98 one warning shows up to ten times, the one next to it once, and most not at all. None of them come from #98: it adds no warning and removes one.

What changes

  • build keeps the matcher, now explicitly and with a comment saying why.
  • Every other setup-java step that runs on a pull request, in ci.yml and codeql-analysis.yml, passes problem-matcher: false. release.yml and dependency-submission.yml never run on one and are left as they are.

Each warning now shows at most once. Still only ten show, the first the parallel build prints, so which ones appear depends on the build order rather than on the PR until the backlog is worked off: 107 of the 188 are NullAway's.

Checked

  • Both workflows parse (act --list), and every setup-java step has the setting above.
  • This PR's own CI run is the real check: the warning annotations should all come from build, once each.

setup-java's problem matcher turns javac's warnings, Error Prone's
among them, into annotations on the diff, and it is on by default. It
was on in every job that compiles the same sources: build, the three
newer JDKs, the five native platforms and both CodeQL analyses. Windows
never annotated, because the matcher's pattern takes no path with a
colon in it.

GitHub keeps only the first ten warnings of a step. The build prints
188, and as it runs in parallel, each job prints them in its own order
and keeps its own ten. So on #98 one warning showed up to ten times,
the one next to it once, and most not at all.

build keeps the matcher, now explicitly and with a comment saying why;
every other setup-java step on a pull request passes
problem-matcher: false. Each warning shows at most once, though still
only the first ten the build prints.
@abashev
abashev merged commit b1e3c41 into main Oct 2, 2026
10 checks passed
@abashev
abashev deleted the javac-warnings-from-one-job branch October 2, 2026 20:33
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.

1 participant