Skip to content

Restore Kotlin build errors and expand tests - #1875

Open
chavic wants to merge 1 commit into
payjoin:masterfrom
chavic:chavic/kotlin-review-followup
Open

chavic wants to merge 1 commit into
payjoin:masterfrom
chavic:chavic/kotlin-review-followup

Conversation

@chavic

@chavic chavic commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #1869. Binding generation now preserves Rust compiler diagnostics when selecting the native library from Cargo's JSON output. Previously a compilation error lost its message and source location.

Adds 22 Kotlin tests covering script/weight validation, persistence failures, callbacks that suspend before succeeding or failing, and receiver pending-fallback closure through closeSession(). The setup docs also list Python 3, which the generation script uses to parse Cargo output.

Validated locally on Linux:

  • Kotlin Nix shell (Rust 1.85, JDK 21): all 45 Kotlin tests passed.
  • Production generation with PAYJOIN_FFI_FEATURES= and compileKotlin passed.
  • cargo fmt --all -- --check, ./contrib/lint.sh, documentation with warnings denied, ./contrib/test_local.sh, nix fmt -- --ci, and codespell passed.

Disclosure: co-authored by Codex
Codex assisted with the code, tests, documentation, and PR description.

Pull Request Checklist

@coveralls

coveralls commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 34783442914

Coverage remained the same at 86.646%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16549
Covered Lines: 14339
Line Coverage: 86.65%
Coverage Strength: 341.85 hits per line

💛 - Coveralls

Keep compiler diagnostics visible while selecting the native library
from Cargo JSON.

Cover script and weight validation, persistence failures and suspension,
and receiver pending-fallback closure through the generated bindings.
Document Python 3 for generation outside Nix.
@chavic
chavic force-pushed the chavic/kotlin-review-followup branch from 8b53277 to e43e7e2 Compare September 13, 2026 21:18

@caarloshenriq caarloshenriq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK e43e7e2

Ran ./gradlew test and ktlintCheck in nix develop .#kotlin, all green including the full IntegrationTests against real directory/relay/bitcoind. Checked the error variants against FFI source, all match.

@spacebear21 spacebear21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK

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.

4 participants