Skip to content

Leftover unchecked and deprecation lint fixes from the this-escape workstream (stacked on #4004) - #4005

Closed
wadoon wants to merge 10 commits into
weigl/cleanwarningsfrom
weigl/cw-this-escape
Closed

wadoon wants to merge 10 commits into
weigl/cleanwarningsfrom
weigl/cw-this-escape

Conversation

@wadoon

@wadoon wadoon commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

What

This branch originally fixed the javac [this-escape] lint warnings
(constructor publishes this before completion) in 12 modules. Per the
campaign cleanup decision, all this-escape fixes were REMOVED from
history
; the serial/this-escape workstream is gone.

  • 10 this-escape-only commits dropped;
  • 2 mixed commits reduced and now contain only:
    • @SuppressWarnings("unchecked") in key.core.wd (WdProfile),
    • @SuppressWarnings("deprecation") in keyext.isabelletranslation
      (IsabelleMasterHandler).

No this-escape/serial suppression, serialVersionUID or transient
remains in the branch range. 2 commits total.

Verification

History pattern-scan over the rewritten range is clean (this-escape,
serial, @Serial, serialVersionUID, transient); the final tree
diff contains only removals of campaign content plus the two kept
warning fixes above.

Draft — part of the warning-cleanup stack on weigl/cleanwarnings
(→ PR #4001). No test-assertion, logic or signature changes.

Commits carry Co-Authored-By: OpenCode (KIT Medium).

Linear-stack head: 56ddb4c800 (re-based on the rebuilt #4004).

@wadoon
wadoon added this pull request to stack #4010 October 24, 2026 22:26
@wadoon
wadoon removed this pull request from stack #4010 October 24, 2026 22:40
@wadoon
wadoon added this pull request to stack #4014 October 24, 2026 23:13
@wadoon wadoon changed the title Fix this-escape javac lint warnings (stacked on warning cleanup) Leftover unchecked and deprecation lint fixes from the this-escape workstream (stacked on #4004) Oct 25, 2026
wadoon added 10 commits October 25, 2026 02:54
Enable all javac lint warnings (-Xlint:all) in the shared JavaCompile
configuration. The compiler tags each warning with its category
([deprecation], [unchecked], [rawtypes], ...), which allows grouping and
tackling them category by category.

Add scripts/collect-warnings.py that runs a full testClasses build, parses
the compiler output and writes build/warnings/warnings.md with the warnings
grouped by category, then by module and source file, plus a summary table.

Co-Authored-By: OpenCode (KIT Medium)
Snapshot of the warnings reported by javac -Xlint:all on a clean
testClasses build (619 warnings, 13 categories, 15 modules), generated by
scripts/collect-warnings.py and grouped by category, module and file.

The script now reports source files relative to the repository root so the
generated inventory is machine independent.

Co-Authored-By: OpenCode (KIT Medium)
Documents the workstream partition (disjoint file ownership), per-category
strategy and the binding ground rules for the -Xlint:all cleanup.

Co-Authored-By: OpenCode (KIT Medium)
Suppress deliberate uses of deprecated APIs (ImmutableArray term/label
containers, Location#getFileURI, Proof#add, old Proof constructor) in
key.core test sources with @SuppressWarnings and a rationale comment.
No test logic or assertions are changed.

Co-Authored-By: OpenCode (KIT Medium)
Suppress deliberate uses of deprecated APIs in key.util test sources:
StringsTest keeps testing the deprecated Strings helpers, IOUtilTest
constructs URLs via the deprecated URL(String) constructor. All changes
are @SuppressWarnings annotations with a rationale comment; no test logic
is changed.

Co-Authored-By: OpenCode (KIT Medium)
Regenerated from a clean full rebuild (--rerun-tasks): 224 warnings
remaining (baseline: 619). The incremental baseline under-reported warnings
that a full recompile reveals (see workstream reports); every fix of the six
workstreams is integrated, so this snapshot reflects the honest residual
in files outside the original workstream scope.

Co-Authored-By: OpenCode (KIT Medium)
javac limits printed warnings to 100 per compilation unit by default, which
truncated the warning inventory (a single file can emit far more, e.g.
TestApplyTaclet). With -Xmaxwarns 100000 the collect-warnings.py inventory is
no longer silently capped.

Co-Authored-By: OpenCode (KIT Medium)
With -Xmaxwarns 100000 the inventory is no longer capped at 100 warnings per
file: 1809 warnings total (deprecation 834, serial 351, this-escape 310,
unchecked 141, rawtypes 79, auxiliaryclass 48, ...). This supersedes the
cap-truncated snapshot (224) and the original baseline (619).

Co-Authored-By: OpenCode (KIT Medium)
Suppress the inherited-getter constructor escapes in the well-definedness
contract classes and the unchecked goal-chooser-builder overrides reported
against every concrete profile subclass.

Co-Authored-By: OpenCode (KIT Medium)
Suppress the intentional handler-wiring escape; keep the deprecated
ImmutableArray parameter of translate() because callers pass term.subs()
which still returns ImmutableArray (migrating would break those call sites).

Co-Authored-By: OpenCode (KIT Medium)
@wadoon
wadoon force-pushed the weigl/cleanwarnings branch from ca48198 to 69d92cc Compare October 25, 2026 00:57
@wadoon
wadoon force-pushed the weigl/cw-this-escape branch from b5d9c72 to 56ddb4c Compare October 25, 2026 00:57
@wadoon
wadoon force-pushed the weigl/cleanwarnings branch 3 times, most recently from 69d92cc to 34aee9a Compare October 25, 2026 01:04
@wadoon wadoon closed this Oct 25, 2026
@wadoon
wadoon deleted the weigl/cw-this-escape branch October 25, 2026 02:33
@wadoon
wadoon removed this pull request from stack #4014 October 26, 2026 01:21
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