Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SDK V4 preview version trimmable #69

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

normj
Copy link
Member

@normj normj commented Oct 23, 2024

Description

Make the V4 SDK preview version trimmable as well as add the metadata for sourcelink.

In order to make the library trimmable I replaced the usage of LitJson with System.Text.Json. This JSON used in the library is always a simple single object JSON of string to string pairs. I created a couple utility methods for converting back and forth from JSON to Dictionary<string, string>.

Testing

Ran the unit and integ tests and all still pass. I manually verified the JSON being produced is the same between LitJson and System.Text.Json and the only difference I saw when writing JSON with System.Text.Json it does more escaping for example escaping the +. I verified LitJson handled the escaping during reading. So if a user writes an object to S3 with this version and old version of the package using LitJson would still be able to read it.

@normj normj force-pushed the normj/v4-trimmable branch from 18f1ea5 to 8f758bd Compare October 23, 2024 06:26
"Name": "Amazon.Extensions.S3.Encryption",
"Type": "Patch",
"ChangelogMessages": [
"Mark the assembly trimmable",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth calling out the replacement of LitJson? Possible performance improvements?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can't see there being any performance benefit and it is underlying implementation detail that I don't think users would care.

@peterrsongg peterrsongg requested a review from 96malhar October 23, 2024 17:34
@normj normj merged commit 0eaed65 into v4sdk-development Oct 24, 2024
2 checks passed
@normj normj deleted the normj/v4-trimmable branch October 24, 2024 20:35
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.

3 participants