fix(bazel): grant common_test_fixtures friend access to jvm_main_lib - #272
Merged
Conversation
SectionManifestParserTest references the internal TOML_PARSING_SUPPORTED expect/actual declaration. Bazel's kt_jvm_library only exposes internal declarations across a friend-module (associates) boundary, not plain deps — common_test_fixtures had deps only, so //kmp/src/jvmTest/kotlin:jvm_tests failed to compile. Mirrors the same associates attribute already used by jvm_tests and android_unit_test_lib. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
tstapler
force-pushed
the
fix/bazel-jvm-tests-toml-associates
branch
from
August 14, 2026 16:51
0d7e20c to
e9204f7
Compare
tstapler
marked this pull request as ready for review
August 14, 2026 16:51
Contributor
JVM Load Benchmark (Desktop)Synthetic in-memory benchmark measuring load performance for the desktop (JVM) app.
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)`36.2%` byte[]_[k] `8.1%` java.lang.String_[k] `6.6%` int[]_[k] `6.1%` java.util.LinkedHashMap$Entry_[k] `4.3%` java.lang.Object[]_[k]Top CPU hotspots (this PR)`96.9%` /usr/lib/x86_64-linux-gnu/libc.so.6 `1.2%` /tmp/sqlite-3.51.3.0-f8e15520-d00a-407c-a0e1-07fb5827bf27-libsqlitejdbc.so `0.5%` __libc_pwrite `0.2%` fsync `0.2%` pthread_cond_signal |
Contributor
Android Load BenchmarkInstrumented benchmark on an API 30 x86_64 emulator — 500-page synthetic graph. Comparing Graph Load
Interactive Write Latency (during Phase 3)
SAF I/O Overhead (ContentProvider vs direct File read)Measures Binder IPC cost added by ContentResolver per readFile() call.
|
rules_kotlin's kt_jvm_library rejects a target listed in both associates and deps simultaneously (fail_if_invalid_associate_deps), which broke the prior commit's fix — associates already grants friend access transitively, so deps must not duplicate it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
renamePage_clears_the_pendingConflicts_entry_for_the_old_file_path used a real PlatformFileSystem rooted at a temp directory, so GraphWriter.renamePage performed genuine disk reads/writes/deletes under a Mutex inside the test's withTimeout(2_000) budget. Under CI resource contention that real I/O occasionally exceeded 2s, causing an intermittent TimeoutCancellationException (CI run 31822728648, job 94839667806) unrelated to the associates/deps fix in this PR. The test only asserts on ViewModel state (pendingConflicts), not actual file contents, so swapping in the fixture's in-memory FakeFileSystem removes the wall-clock-dependent I/O while still exercising the same GraphWriter/BacklinkRenamer/ViewModel code paths deterministically. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
common_test_fixtures(kmp/src/commonTest/kotlin/BUILD.bazel) compilesSectionManifestParserTest.kt, which references theinternalTOML_PARSING_SUPPORTEDexpect/actual declaration injvm_main_lib.rules_kotlinonly exposesinternaldeclarations across a friend-module boundary (associates), not plaindeps— this target haddepsonly, causing//kmp/src/jvmTest/kotlin:jvm_teststo fail to compile and the "Bazel JVM tests" CI job to be red onmain.associates = ["//kmp/src/jvmMain/kotlin:jvm_main_lib"], mirroring the existing pattern onjvm_testsandandroid_unit_test_lib.Test plan