Repository navigation
codegen: emit the Kotlin client only for projects with a companion API (#311) - #317
Merged
Merged
Conversation
#311) Every project got a Kotlin client emitted into .rivet/generated/ — a tree section the standard .gitignore excludes (rivet's own example layout ignores it). The release freshness gate diffs the tree against client-outputs, so every desktop-only product failed the gate with 1 generated file missing until it force-added a file nothing consumes; examples/taskboard fails its own gate on a fresh clone. The Kotlin client is now part of the fresh output set only when the project declares companion device RPCs — exactly the projects with a Kotlin consumer. client-outputs is exported so products and tests can inspect the fresh set directly. examples/taskboard is regenerated against current main (it declares device-rpcs and keeps its client).
The demo project has no companion API, so the fresh set no longer contains the Kotlin client: assert its absence, declare a companion RPC around the Kotlin content and enum content sections (which also switch Swift into the RivetTypes device surface — the flip sits after the Swift/C++ assertions), and restore the desktop-only manifest before the sections that reuse the project binding.
Owner
Author
|
Pushed |
The 'generated Swift, C++, and Kotlin clients' line was static; now it reflects whether the project's fresh output set includes the Kotlin client. The source-package smoke asserts the Kotlin client exists after declaring the starter's greet RPC — a desktop-only scaffold no longer carries the file (issue #311).
The KtSmoke scaffold is the Android consumer of the shared generated client, so it declares the device RPCs it exercises before generating (issue #311).
2 tasks
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.
Closes #311.
Since the Kotlin client joined
client-outputsunconditionally, every product's fresh output set requires.rivet/generated/kotlin/dev/rivet/generated/GeneratedBackend.kt— inside.rivet/, which the standard.gitignoreignores (including rivet's own example layout).doctor --releasetherefore failed on every desktop-only product with "1 generated file missing" until the product force-added a file nothing consumes, andexamples/taskboardfails its own gate on a fresh clone.The Kotlin client is now emitted only when the project declares companion
device-rpcs— exactly the projects with a Kotlin/Android consumer.client-outputsis exported so products and tests can inspect the fresh set directly.device-rpcs(or an emptied list): no Kotlin client in the fresh set; a previously generated file may linger on disk but is no longer part of the gate's contract.device-rpcs: unchanged behavior, including theRivetDeviceAPIsurface.examples/taskboardis regenerated against current main — it declaresdevice-rpcs, keeps its Kotlin client, and its stale Swift/C++ outputs are refreshed too, so the example passesdoctor --releaseon a fresh clone again.Tests in
rivet/tests/device-codegen.rkt: no declaration → no Kotlin path inclient-outputs; declaration → Kotlin path present; emptied declaration → dropped from the fresh set.