Skip to content

Merge master to develop#2267

Merged
AArnott merged 129 commits into
developfrom
master-to-develop
May 20, 2026
Merged

Merge master to develop#2267
AArnott merged 129 commits into
developfrom
master-to-develop

Conversation

@AArnott

@AArnott AArnott commented May 20, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

tomap and others added 30 commits November 14, 2024 10:05
…rator

Fix Source Generator doesnt work in Unity
AArnott and others added 28 commits March 2, 2025 15:55
Add memory size check to `GetMemoryCheckResult`
AccessModifier was added to generated code.
Union type keys set with are usually small positive integers, likely
to fit in a single byte. As late as version 2.5.198, the library
would encode [Union(0, typeof(Foo))] as two bytes 0x92 0x00 (one for
"two-element array", and one for the 0 integer key), followed by the
serialization of type Foo.

In version 3.1.4, [Union(0, typeof(Foo))] is instead encoded as six
bytes 0x92 0xD2 0x00 0x00 0x00 0x00 (one for "two-element array",
one for "32-bit integer", and the four bytes of the 0 integer key).
Although the two representations are compatible, for code bases that
use many small polymorphic objects, the migration from 2.x to 3.x would
lead to a significant increase in the size of the serialized data.

This behavior is caused by the generated code for the interface using
`WriteInt32` (which always encodes the integer as five bytes), and
is fixed by instead using `Write` (which uses the smallest possible
number of bytes for its argument).
* [WIP} Remove unneeded GetTypeInfo() calls

Improve performcance by removing unneeded GetTypeInfo() calls

* typeof(T) reuse

* Remove AsType() calls

* Revert IsSupportedType with TypeInfo

* Fix code review remarks
Union type keys set with are usually small positive integers, likely
to fit in a single byte. As late as version 2.5.198, the library
would encode [Union(0, typeof(Foo))] as two bytes 0x92 0x00 (one for
"two-element array", and one for the 0 integer key), followed by the
serialization of type Foo.

In version 3.1.4, [Union(0, typeof(Foo))] is instead encoded as six
bytes 0x92 0xD2 0x00 0x00 0x00 0x00 (one for "two-element array",
one for "32-bit integer", and the four bytes of the 0 integer key).
Although the two representations are compatible, for code bases that
use many small polymorphic objects, the migration from 2.x to 3.x would
lead to a significant increase in the size of the serialized data.

This behavior is caused by the generated code for the interface using
`WriteInt32` (which always encodes the integer as five bytes), and
is fixed by instead using `Write` (which uses the smallest possible
number of bytes for its argument).
This PR fixes a memory leak in Json Serializer and other small disposable issues
Fix Incorrect DateTimeOffset Serializer
…-generation

fix: prevent StackOverflow in Equals with recursive generic constraints
These files are produced by the new C# Dev Kit extension.
Fix typo and ignore .lscache files
…zation

Add more types to the default disallow list of named types to be deserialized
@AArnott AArnott merged commit 5e9e94d into develop May 20, 2026
3 checks passed
@AArnott AArnott deleted the master-to-develop branch May 20, 2026 22:39
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.