fix(deps): update fory to v1.2.0#43
Open
rossdanderson wants to merge 1 commit into
Open
Conversation
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.
This PR contains the following updates:
1.1.0→1.2.01.1.0→1.2.0Release Notes
apache/fory (org.apache.fory:fory-core)
v1.2.0Highlights
sun.misc.Unsafeusage for JDK 25.Java 25+ Without
sun.misc.UnsafeJDK 25 continues the platform shift away from
sun.misc.Unsafe. Fory 1.2.0adds a Java 25 multi-release runtime path so applications can run on JDK 25+
without resolving
sun.misc.Unsafefrom Fory's active class graph.Older JDKs keep the existing fast paths. On JDK 25+, Fory uses replacement
classes backed by supported JVM mechanisms such as
VarHandle,MethodHandle,arrays, and
ByteBuffer. Classes that previously depended on constructorbypassing should provide an accessible no-arg constructor, use records, or
register a custom serializer.
Compatible Scalar Field Reads
Compatible mode already allows readers and writers to add, remove, and reorder
fields. Fory 1.2.0 extends that model to selected scalar type changes: when a
matched top-level field changes between boolean, string, numeric, and decimal
types, the reader can deserialize the value if the conversion is lossless.
Examples include reading
"123"as an integer field, reading1or0as aboolean field, reading booleans as
1/0, reading numbers or decimals ascanonical strings, and widening or narrowing numeric values only when no range
or precision is lost. Invalid strings, out-of-range values, lossy float/integer
conversions, and reference-tracked scalar type changes fail during
deserialization. The conversion applies to matched compatible fields, not to
root values or collection elements.
The examples below show Rust and Java using an
int64writer field and aStringreader field. The same compatible scalar field conversion is supportedacross Fory's compatible-mode runtimes: Java, Python, Rust, C++, Go, C#, Swift,
Dart, JavaScript/TypeScript, Kotlin, and Scala. Compatible mode is enabled by
default in the Java and Python runtimes for both xlang and native serialization.
Rust example:
Java example:
The same rule works in the other direction, for example reading a
Stringfield value such as
"42"asint64, when the string uses Fory's strictfinite decimal grammar and the target range can represent the value exactly.
Generated gRPC Support
Fory 1.2.0 expands compiler-generated gRPC service companions. The generated
services use standard gRPC transports, channels, deadlines, metadata,
interceptors, status codes, and streaming shapes, while request and response
objects are encoded with Fory instead of protobuf message bytes. Use this mode
when both sides of the RPC are generated from the same Fory IDL, protobuf IDL,
or FlatBuffers IDL and you want gRPC operational semantics with Fory payload
encoding.
Generated gRPC support now covers Java, Python, Go, Rust, C#, Scala, Kotlin,
and JavaScript/TypeScript. JavaScript includes Node.js gRPC support and browser
gRPC-Web client generation. Only Rust and Java snippets are shown below; the
other supported languages provide the same Fory-backed service companion model
without duplicating code here.
The examples below use this shared schema:
Rust generation emits tonic-based service API and binding modules:
Java generation emits grpc-java service bases, stubs, and Fory codecs:
The generated gRPC companions intentionally do not make gRPC a hard dependency
of the core Fory language packages. Applications add the transport libraries
they use: grpc-java for Java and Scala,
grpciofor Python, grpc-go for Go,tonic/bytesfor Rust, .NET gRPC packages for C#,@grpc/grpc-jsorgrpc-webfor JavaScript, and grpc-java/grpc-kotlin for Kotlin.Features
Arc<dyn Any + Send + Sync>type by @chaokunyang in #3736Bug Fix
Other Improvements
New Contributors
Full Changelog: apache/fory@v1.1.0...v1.2.0
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate.