Skip to content

build(detekt): lint jvmCommonMain - #773

Merged
tstapler merged 3 commits into
mainfrom
chore/detekt-jvmcommonmain
Nov 27, 2026
Merged

tstapler merged 3 commits into
mainfrom
chore/detekt-jvmcommonmain

Conversation

@tstapler

Copy link
Copy Markdown
Owner

kmp/src/jvmCommonMain was linted by neither Gradle nor //kmp:detekt. This adds it to both.

It surfaced 21 findings; the baseline is unchanged:

  • 7 JvmOnlyApiInCommonMain hits were false positives on a JVM-only source set, so the rule now excludes it.
  • Unused imports, a no-op rethrow, a compound condition, and a missing CancellationException rethrow are fixed in code.
  • SpreadOperator and three TooManyFunctions are suppressed with a reason.

Run locally: ./gradlew :kmp:detekt, bazel test //kmp:detekt //kmp:business_tests, bazel build of the desktop and Android apps, scripts/ci/check-detekt-srcs.sh.

Add the source set to both the Gradle detekt block and //kmp:detekt, and fix
what it found instead of growing the baseline. JvmOnlyApiInCommonMain now
excludes jvmCommonMain, which is JVM-only.
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

JVM Load Benchmark (Desktop)

0 regressed · 3 improved · 2 unchanged · 0 new · 0 removed

jvm/GraphLoad

Benchmark Base Head Change
phase2Ms 1 ms 0 ms 🟢 -100.0% ▰▰▰▰▰
totalMs 2 ms 1 ms 🟢 -50.0% ▰▰▰▰▰

jvm/WriteLatency

Benchmark Base Head Change
jankBaselineP95Ms 44 ms 26 ms 🟢 -40.9% ▰▰▰▰▰
2 unchanged

jvm/GraphLoad

Benchmark Base Head Change
phase1TtiMs 0 ms 0 ms ⚪ n/a (base is 0)
phase3Ms 1 ms 1 ms ⚪ 0.0% ▱▱▱▱▱
Environment
Base Head
branch main HEAD
gitSha 5e67595d9 a601e8990
graphConfig xlarge xlarge
pageCount 230 230

A change counts when it is ≥ 5% and, where the data allows, statistically significant. Judged: 5 by threshold only (point estimates).

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

JVM Load Benchmark: profiling details

Flamegraphs (this PR) **Allocation** — object allocation pressure (JDBC/SQLite churn)

Alloc flamegraph not available

CPU — method-level hotspots by on-CPU time

CPU flamegraph not available

Top allocation hotspots (this PR) `34.4%` byte[]_[k] `7.5%` java.lang.String_[k] `5.9%` int[]_[k] `4.6%` java.lang.Object[]_[k] `3.9%` java.util.LinkedHashMap$Entry_[k]
Top CPU hotspots (this PR) `98.7%` /usr/lib/x86_64-linux-gnu/libc.so.6 `0.5%` /tmp/sqlite-3.51.3.0-f8630249-2751-4347-b4f4-db144ded90a2-libsqlitejdbc.so `0.1%` pthread_cond_signal `0.1%` SR_handler `0%` syscall

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Android Load Benchmark (API 30 x86_64 emulator)

1 regressed · 7 improved · 1 unchanged · 0 new · 0 removed

android/WriteLatency

Benchmark Base Head Change
writes 22 writes 13 writes 🔴 -40.9% ▰▰▰▰▰
phase3P95Ms 15 ms 9 ms 🟢 -40.0% ▰▰▰▰▱
jankFactor 1.67 x 1.29 x 🟢 -22.8% ▰▰▰▱▱
baselineP95Ms 9 ms 7 ms 🟢 -22.2% ▰▰▰▱▱

android/GraphLoad

Benchmark Base Head Change
phase1Ms 50 ms 25 ms 🟢 -50.0% ▰▰▰▰▰
phase3Ms 4762 ms 2415 ms 🟢 -49.3% ▰▰▰▰▰

android/SafIo

Benchmark Base Head Change
safPerFileMs 0.23 ms 0.13 ms 🟢 -43.5% ▰▰▰▰▰
safOverhead 7 x 4 x 🟢 -42.9% ▰▰▰▰▰
1 unchanged

android/SafIo

Benchmark Base Head Change
safDirectPerFileMs 0 ms 0 ms ⚪ n/a (base is 0)
Environment
Base Head
branch main HEAD
gitSha 5e67595d9 a601e8990
pageCount 530 530

A change counts when it is ≥ 5% and, where the data allows, statistically significant. Judged: 9 by threshold only (point estimates).

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

CI memory (Gradle diff-coverage job, 16 GB runner)

2 benchmarks (no base to compare with)

ci-memory/diff-coverage

Benchmark Value Range
peak_used [max] 9050 MB —
min_available [min] 6932 MB —
Environment
Head
sha a601e8990898b9f983c0218259912a73bd443847

Head-only report: add a base to see changes.

@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

CI memory (Bazel Android build, 16 GB runner)

2 regressed · 0 improved · 0 unchanged · 0 new · 0 removed

ci-memory/android-build

Benchmark Base Head Change
peak_used [max] 2064 MB 12836 MB 🔴 +521.9% ▰▰▰▰▰
min_available [min] 13636 MB 3146 MB 🔴 -76.9% ▰▰▰▰▰
Environment
Base Head
sha 5e67595d93450309f95abd43cbd36687e101a94e a601e8990898b9f983c0218259912a73bd443847

A change counts when it is ≥ 10% and ≥ 500 absolute and, where the data allows, statistically significant. Judged: 2 by threshold only (point estimates).

Replaces the unreachable CancellationException rethrow, which the diff
coverage gate rejected.
@tstapler
tstapler marked this pull request as ready for review November 26, 2026 23:31
@tstapler
tstapler merged commit 9c6cac5 into main Nov 27, 2026
23 of 24 checks passed
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