Serialize via the shared pure-Kotlin SerializationCodec (no JNI)#496
Open
milyin wants to merge 6 commits into
Open
Serialize via the shared pure-Kotlin SerializationCodec (no JNI)#496milyin wants to merge 6 commits into
milyin wants to merge 6 commits into
Conversation
Replace the per-element JNI serialization (serializeViaJNI) with the shared pure-Kotlin SerializationCodec. ZSerializer/ZDeserializer build a SerializationCodec.SerdeType from the Guava TypeToken's java.lang.reflect.Type (serdeTypeOfJava) and call the shared codec through the SAME throwZError0 error handler used for generated wrappers (the codec never throws — it invokes the handler, which throws ZError), so the hand-written serializer is wired exactly like a generated one. No duplication — the same codec zenoh-kotlin uses. Full jvmTest: 120 pass (the 10 ZBytes tests now run via pure Kotlin). The Type path's supported set is unchanged (signed/collection; Java can't express the unsigned/Pair/Triple types the KType path adds). Depends on the zenoh-flat-jni SerializationCodec commit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The pure-Kotlin SerializationCodec this branch delegates to lives in zenoh-flat-jni#13 (db4fb2d). Point CI at it so the composite build has the shared codec. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
milyin
force-pushed
the
pure-kotlin-serde
branch
from
July 21, 2026 14:53
77690ae to
ce7f32a
Compare
milyin
changed the base branch from
split-error-handler
to
zenoh-flat-transition
July 21, 2026 14:53
The zenoh-flat-jni serialization PR was rebased onto main (conflict resolution), changing the SerializationCodec commit SHA. Repoint CI at the current commit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Parameters/Encoding/ZenohId correspondence tests moved into zenoh-flat-jni's own test suite (it now self-verifies its pure implementations against the native oracle, which relocated to the internal io.zenoh.jni.test package). SDK production is unaffected — it uses the pure io.zenoh.jni.query.Parameters and the generated Encoding/ZenohId handles, all unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
zenoh-flat-jni moved its native oracle to the internal io.zenoh.jni.test package and added self-verifying correspondence tests. Point CI at that commit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
zenoh-flat-jni #13 squash-merged to main as 71736f2. Re-pin from the pre-merge branch commit 2755c06 (an orphan once the pure-kotlin-serde branch is deleted) to the permanent main commit, which also carries the final merged SerializationCodec (strict UTF-8). Co-Authored-By: Claude Opus 4.8 <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.
What
Replaces the per-element JNI serialization (
serializeViaJNI) with the shared pure-KotlinSerializationCodec(zenoh-flat-jni#13) — the same codec zenoh-kotlin uses (no duplication).ZSerializer/ZDeserializerbuild aSerializationCodec.SerdeTypefrom the GuavaTypeToken'sjava.lang.reflect.Type(serdeTypeOfJava) and call the shared codec through the samethrowZError0handler used for generated wrappers (the codec never throws — it invokes the handler, which throwsZError), so the hand-written serializer is wired exactly like a generated one.Verification
Full
jvmTest: 120 pass (the 10ZBytestests now run via pure Kotlin). TheTypepath's supported set is unchanged (signed/collection; Java can't express the unsigned/Pair/Tripletypes the KotlinKTypepath adds).Notes
Typepath was untouched there — so this branches offsplit-error-handlerdirectly. Depends on zenoh-flat-jni#13; CI pin bumped to its commit.🤖 Generated with Claude Code