Skip to content

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Sep 4, 2025

  • Reduce the bundled code size of the runtime for schema serde, from about 2k to 1k lines of code (non-minified)

@kuhe kuhe requested a review from a team as a code owner September 4, 2025 15:05
@kuhe kuhe force-pushed the schema/optimization branch 5 times, most recently from 82198a7 to ac5d7d3 Compare September 4, 2025 17:51
@kuhe kuhe force-pushed the schema/optimization branch from ac5d7d3 to 64b312c Compare September 4, 2025 17:58
*/
public constructor(
private readonly ref: SchemaRef,
private constructor(
Copy link
Contributor Author

@kuhe kuhe Sep 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpha API breaking change: the only public constructor is now the static constructor.

* Static constructor that attempts to avoid wrapping a NormalizedSchema within another.
*/
public static of(ref: SchemaRef, memberName?: string): NormalizedSchema {
public static of(ref: SchemaRef): NormalizedSchema {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpha API breaking change: static public ctor no longer allows a member name.

Members must not be initialized on their own. They must be retrieved as part of an aggregate schema (struct, union, list, map, document etc.).

This simplifies reasoning about the schema data that is present.

@kuhe kuhe force-pushed the schema/optimization branch from 3b3ccc7 to dea7bd9 Compare September 4, 2025 19:06
@kuhe kuhe merged commit bb7c1c1 into smithy-lang:main Sep 5, 2025
11 checks passed
@kuhe kuhe deleted the schema/optimization branch September 5, 2025 15:44
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.

2 participants