Remove the Kotlin implementation; the Rust CLI is now the only one - #498
Merged
tinder-maxwellelliott merged 2 commits intoSep 14, 2026
Merged
Conversation
The Rust implementation under src/ had been shipping alongside the JVM CLI as //:bazel-diff-rust. This removes the Kotlin CLI (cli/), its JVM build plumbing (rules_kotlin, rules_jvm_external/maven, java_proto, WORKSPACE support, ktfmt) and every Kotlin-vs-Rust comparison tool (perf_gate, benchmark, serve_stress_compare, docs/kotlin-*.md, perf-gate.yaml), and makes //:bazel-diff point at the Rust binary. //:bazel-diff-rust stays as an alias so existing BCR consumers keep building. The one parity gap this exposed -- `explain` (#480) existed only in Kotlin -- is closed by porting it to src/explain.rs with the same flags, output formats and JSON field names, plus unit tests mirroring the Kotlin ones. What moved: e2e fixtures to tests/resources/ (the Rust suite is their only reader), formatters to //tools/format, the coverage checker's default include prefixes to the Rust sources. CI job ids that branch protection requires by name (test-jre21, test-jre11-run-example, Rust candidate *, release-artifacts) keep their names and only change contents; the serve, Alpine stress and firecracker paths use the static musl binary instead of the deploy jar. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Building //:bazel-diff on the windows-latest rows of test-jre11-run-example hit the two Windows rules_rust pitfalls the release-artifacts job already works around, now that the example script builds Rust instead of Kotlin: - Bazel 8.x: LNK1181 on the Rust stdlib rlib path -- MSVC's link.exe is MAX_PATH-bound. The Windows example step now writes `startup --output_user_root=C:/b` to Bazel's system rc so every Bazel the script runs (outer build and nested queries) uses the short root. - Bazel 9.x: ring's build script cannot find ring_core_generated/... without the legacy external runfiles layout. `--legacy_external_runfiles` moves into .bazelrc under build:windows, where `run` inherits it and `query` (the nested Bazel) does not. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
tinder-maxwellelliott
marked this pull request as ready for review
September 13, 2026 21:12
tinder-maxwellelliott
deleted the
claude/kotlin-rust-migration-0b3de4
branch
September 14, 2026 13:30
tinder-maxwellelliott
added a commit
that referenced
this pull request
Sep 14, 2026
master removed the Kotlin implementation (#498), which rewrote the same release.yaml header and .bazelrc comment this branch changed. Kept the single-job gate from this branch and dropped its Kotlin/E2ETest wording; kept master's description of the e2e suite in .bazelrc. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
tinder-maxwellelliott
added a commit
that referenced
this pull request
Sep 14, 2026
… Alpine bazel probe (#500) The Serve Stress cron has been red since 2026-09-10. PR #490 pointed the stress harness at the Rust //src:bazel-diff serve, and PR #498 then made it the only implementation, but the Rust port was missing two behaviours the harness (and README) rely on: * A failed initial `git fetch` bailed out of serve() before binding, so a fresh instance started while the remote is down simply exited. It now logs the error and comes up lame-ducked: /health and queries answer 503 forever, /metrics keeps answering with ready=false, matching the RFC #29 contract the Kotlin serve implemented. * Clearing an orphaned .git/index.lock and retrying the checkout was silent; it now logs "cleared stale git index.lock ..." so the harness can count self-heals. Separately, the Alpine real-repo cron failed on 2026-09-14 because the bazel probe in tools/serve_stress_alpine.sh treated a GitHub Releases 504 (downloading rules_java) as "bazel does not run on musl". The probe now retries download/5xx failures a few times with backoff and still fails fast on any other error. Verified locally: cargo test/clippy/fmt clean, and `tools/serve_stress.py --quick --only lock` / `--only lameduck` pass all checks that failed in CI. Co-authored-by: Claude Fable 5.1 <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
The Rust implementation under
src/had been shipping alongside the JVM CLI as//:bazel-diff-rust. This PR removes the Kotlin implementation and everything that existed only to build, test or compare it, and makes the Rust binary//:bazel-diff.Removed
cli/(the Kotlin CLI, its unit tests and JUnit fixtures),proto/(java_proto), WORKSPACE-mode support (WORKSPACE,repositories.bzl,constants.bzl,artifacts.bzl,maven_install.json,extensions.bzl), the rules_kotlin coverage patch.MODULE.bazel: rules_kotlin, rules_jvm_external + maven, rules_java, rules_proto, stardoc, grpc/grpc-java, rules_nodejs, rules_foreign_cc, the ktfmt extension and the Kotlin toolchain.MODULE.bazel.lockshrinks by ~900 lines.tools/perf_gate*.py,perf_serve*.py,perf_workload.py,benchmark*.py,serve_stress_compare.py,perf-gate.yaml,docs/kotlin-*.md.Parity gap closed.
explain(#480, issue #479) existed only in Kotlin. It is ported tosrc/explain.rswith the same flags, text/JSON/DOT/Mermaid output and JSON field names, and 20 unit tests mirroring the Kotlin ones (99.8% line coverage).Moved / rewired
cli/src/test/resources/→tests/resources/(the Rust suite is their only reader);.bazelignoreand.gitattributesfollow.//cli/format→//tools/format:rustfmtand//tools/format:buildifier.//:bazel-diff→//src:bazel-diff.//:bazel-diff-rustis kept as an alias so existing BCR consumers keep building (BCR presubmit still builds both).src/,tools/coverage/src/,tools/coverage_check.py.tools/e2esplit generator (Rust-only now),.claudeskills and all workflows updated. README regenerated from the Rust binary's--help.Verification (local, Bazel 8.7.0, macOS)
bazel build //...succeeds.//:rust_tests //:rust_clippy_check //:rust_format_check //tools/...all pass.core::integration_golden,core::target_distance_metrics,core::serve_end_to_endpass from the new fixture location.Not run locally: Bazel 7.x/9.x, Windows, the Alpine/firecracker crons. The CI matrix covers the first two.
Reviewer notes
masterrequirestest-jre21 (...),test-jre11-run-example (...),Rust candidate ...andrelease-artifacts (...)by name, so the job ids are kept and only their contents changed (e.g.test-jre21is now the coverage gate). Rename them together with the branch-protection rule in a follow-up.integration_external_target.ymlruns a script fromtinder-maxwellelliott/bazel-diff-repro-1, which may still fetch the deploy jar; that repo needs its own update.Cargo.tomlis still at 39.0.0 vs 47.0.0 inMODULE.bazel(pre-existing, untouched).🤖 Generated with Claude Code