Commit 47a73a1
authored
feat(xlang/java): refactor java native serialization type system and streaming type info for xlang (#3153)
## Why?
Fory needs streaming-friendly shared type meta so readers can
deserialize without seeking. The current work also unifies native/xlang
type IDs and removes legacy paths that were causing inconsistent type
resolution and CI failures across languages.
## What does this PR do?
- Switch shared type meta to the streaming wire format (inline TypeDef
bytes with index marker) and remove legacy meta-offset handling.
- Unify native and xlang type ID handling in Java resolvers, simplify
dispatch paths, and remove outdated compatibility branches.
- Add `registerSerializerAndType` API for explicit type+serializer
registration flow.
- Fix Go skip path to consume streaming shared type meta in compatible
struct skipping and add a regression test.
- Keep resolver fast paths by inlining class-info reads and avoiding
redundant serializer creation.
## Related issues
Closes #3157
Closes #3119
#2609 #2818
## Does this PR introduce any user-facing change?
<!--
If any user-facing interface changes, please [open an
issue](https://github.com/apache/fory/issues/new/choose) describing the
need to do so and update the document if necessary.
Delete section if not applicable.
-->
- [x] Does this PR introduce any public API change?
- [x] Does this PR introduce any binary protocol compatibility change?
## Benchmark
Not run.1 parent 3f40a69 commit 47a73a1
File tree
114 files changed
+6609
-4659
lines changed- .github/workflows
- benchmarks/java_benchmark/src/main/java/org/apache/fory/benchmark
- ci
- tasks
- cpp/fory/serialization
- docs/specification
- go/fory
- integration_tests
- javascript/packages/fory/lib
- java
- fory-core/src
- main
- java/org/apache/fory
- builder
- codegen
- config
- logging
- meta
- reflect
- resolver
- serializer
- collection
- type
- util
- resources/META-INF/native-image/org.apache.fory/fory-core
- test/java/org/apache/fory
- builder
- resolver
- serializer
- xlang
- fory-latest-jdk-tests
- src/test/java/org/apache/fory/integration_tests
- kotlin/src/main/kotlin/org/apache/fory/serializer/kotlin
- python/pyfory
- rust
- fory-core/src
- resolver
- serializer
- fory-derive/src/object
- tests/tests
- scala/src/main/java/org/apache/fory/serializer/scala
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
114 files changed
+6609
-4659
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
| |||
410 | 411 | | |
411 | 412 | | |
412 | 413 | | |
| 414 | + | |
413 | 415 | | |
414 | 416 | | |
415 | 417 | | |
| |||
531 | 533 | | |
532 | 534 | | |
533 | 535 | | |
| 536 | + | |
534 | 537 | | |
535 | 538 | | |
536 | 539 | | |
| |||
599 | 602 | | |
600 | 603 | | |
601 | 604 | | |
| 605 | + | |
602 | 606 | | |
603 | 607 | | |
604 | 608 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
295 | 297 | | |
296 | 298 | | |
297 | 299 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | 300 | | |
302 | 301 | | |
303 | 302 | | |
| |||
498 | 497 | | |
499 | 498 | | |
500 | 499 | | |
501 | | - | |
502 | 500 | | |
503 | 501 | | |
504 | 502 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
191 | 189 | | |
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
197 | 195 | | |
| 196 | + | |
198 | 197 | | |
199 | 198 | | |
200 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | 185 | | |
192 | 186 | | |
193 | 187 | | |
| |||
220 | 214 | | |
221 | 215 | | |
222 | 216 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | 217 | | |
228 | 218 | | |
229 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | 178 | | |
185 | 179 | | |
186 | 180 | | |
| |||
218 | 212 | | |
219 | 213 | | |
220 | 214 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | 215 | | |
233 | 216 | | |
234 | 217 | | |
| |||
0 commit comments