Skip to content

build(quality): harden parallel compiler-warning collection #347

Description

@GionaGranchelli

Follow-up from PR #344 (Epic 10.1c, landed as f7fd192). Not closure work — P3 maintenance/hardening, no urgency.

Context: VerifyCompilerWarningsTask.collectCurrent() (build-logic/src/main/kotlin/dev/tramai/build/quality/CompilerWarningsTasks.kt) was parallelized (2-4 way bounded executor) so full-repository verification fits the CI step budget.

Proposed hardening (no behavioral/API scope):

  1. Snapshot kotlinCompilerClasspath.files.toList() and compileClasspath.files.toList() before entering the worker pool — currently the Gradle FileCollection is resolved from executor threads (works, but relies on the collection being safe for concurrent iteration; snapshotting makes it explicit and teardown-safe).
  2. Explicitly sort the aggregated WarningEntry list after futures.flatMap { it.get() } join — currently determinism relies on the ordered-futures merge; an explicit sortedWith(compareBy(path, diagnostic, message)) (mirroring CompilerWarningsParser.parse) makes it self-evident.
  3. Preserve: bounded 2-4 parallelism, per-unit output dirs, fail-closed Future.get() propagation, executor shutdown in finally.

Verification when picked up: existing 64-contract suite must stay green; verifyCompilerWarnings + verifyStaticAnalysis + verifyDependencyHygiene local run stays under ~5m for full verification.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions