Skip to content

kotlin: Windows kotlin_test coverage for consumers without the rules_kotlin patch (part of #9069) - #12780

Merged
TrapsterDK merged 1 commit into
mainfrom
fix-9069-kotlin-consumer-patch
Nov 15, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
fix-9069-kotlin-consumer-patch

Conversation

@TrapsterDK

@TrapsterDK TrapsterDK commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #9069

What changed

  • kotlin_test (kotlin/private/defs.bzl, kwargs.bzl) sets the upstream kt_jvm_test main_class to the test class under the new //kotlin/private:windows_coverage config_setting (Windows target + --collect_code_coverage), else BazelTestRunner. The rules_kotlin 2.4.21 Windows launcher appends -Dbazel.test_suite=<main_class>, which now names the test class; JACOCO_MAIN_CLASS from dx_jvm_test_coverage still starts BazelTestRunner. This lives in rules_dx code, so consumers get it with no setup.
  • Removed the root-only patches/rules_kotlin/windows_coverage_test_suite.patch, its single_version_override in MODULE.bazel and the patches/README.md row. MODULE.bazel.lock regenerated with Bazel.

Tests

Remaining for #9069

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvuiHK9vSNJZWiqKfX

@TrapsterDK TrapsterDK added the needs-review Touches review paths; needs a second-session Review: comment label Nov 14, 2026
@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Run 43650776233 failed on the julia package_name analysis error (main bug, fixed by #12641), not on Kotlin. #12641 is now stacked on this branch; run 43651406826 covers both.

@TrapsterDK

Copy link
Copy Markdown
Collaborator Author

Run 43651406826 (Windows cpp_rust): every probe passed, including fetch_coverage. The run failed only at the no_refetch check: "a restarted server refetched repositories" (local_config_winsdk, host_platform, local_jdk, ...). #12703 fixes that check. I stacked #12703's 3 commits, plus a unit-test fix that writes the rules_julia patches in the_consumer_materializes_from_dx_init (that test also fails on main), onto fix-11418-julia-package-name. Then I dispatched run 43653857809. The coverage probe, which covers Kotlin, runs after no_refetch, so it is still unverified.

@TrapsterDK
TrapsterDK marked this pull request as ready for review November 15, 2026 00:01
…ules_kotlin patch (#9069)

kotlin_test passes the test class as kt_jvm_test main_class under Windows
coverage, so the -Dbazel.test_suite flag the rules_kotlin 2.4.21 launcher
appends names the test class. JACOCO_MAIN_CLASS still starts the dx runner.
Drop the root-only patches/rules_kotlin patch and its override.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hvuiHK9vSNJZWiqKfX
@TrapsterDK
TrapsterDK force-pushed the fix-9069-kotlin-consumer-patch branch from ed5212a to 134cbe6 Compare November 15, 2026 01:40
@TrapsterDK
TrapsterDK merged commit 420fe64 into main Nov 15, 2026
1 check failed
@TrapsterDK
TrapsterDK deleted the fix-9069-kotlin-consumer-patch branch November 15, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Touches review paths; needs a second-session Review: comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant