Skip to content

Conversation

@WeihanLi
Copy link
Contributor

@WeihanLi WeihanLi commented Jul 31, 2025

This PR

  • Expose ValueJsonConverter
  • Add JsonSourceGenerator serialize test cases
  • Enable AOT analyzer and let sample AOT safe

Related Issues

Fixes #536

Notes

We needed to exclude diagnostics to work around dotnet-format issue, see dotnet/sdk#50012

Follow-up Tasks

How to test

@WeihanLi WeihanLi requested a review from a team as a code owner July 31, 2025 10:48
@WeihanLi WeihanLi changed the title feat: expose ValueJsonConverter and add JsonSourceGenerator test cases fix: expose ValueJsonConverter for generator support and add JsonSourceGenerator test cases Jul 31, 2025
@codecov
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.48%. Comparing base (c0eb12a) to head (f4257b8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #537   +/-   ##
=======================================
  Coverage   88.48%   88.48%           
=======================================
  Files          50       50           
  Lines        2102     2102           
  Branches      245      245           
=======================================
  Hits         1860     1860           
  Misses        191      191           
  Partials       51       51           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@WeihanLi WeihanLi force-pushed the json-source-generator branch from c6821eb to 648d4d5 Compare July 31, 2025 10:49
@WeihanLi WeihanLi force-pushed the json-source-generator branch from 2ff0d6f to a82b998 Compare July 31, 2025 11:11
@WeihanLi WeihanLi marked this pull request as draft July 31, 2025 11:14
@WeihanLi WeihanLi marked this pull request as ready for review July 31, 2025 12:38
Copy link
Member

@askpt askpt left a comment

Choose a reason for hiding this comment

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

I don't see any issues with this PR. Does this also sort the #440 or we should investigate it better?

Copy link
Member

@toddbaert toddbaert left a comment

Choose a reason for hiding this comment

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

Looks like this does solve #440 as well, at least partially? Should we mention that in the commit or break it out to another?

Looks good to me, let's just be careful to make sure to acknowledge that when we make this public we are adding more surface area to the SDK's API that we must not break; if there's any possible breaking changes we want to make to the serializer, lets make them now.

@askpt
Copy link
Member

askpt commented Jul 31, 2025

Looks like this does solve #440 as well, at least partially? Should we mention that in the commit or break it out to another?

For this I am happy to keep it in this PR and investigate it better in a separate effort. This PR adds the specific properties to announce this library is NativeAOT, which it seems it is by the test scenario in the pipeline. We can keep it in that PR and then make an official announcement or even add more testing around it.

Looks good to me, let's just be careful to make sure to acknowledge that when we make this public we are adding more surface area to the SDK's API that we must not break; if there's any possible breaking changes we want to make to the serializer, lets make them now.

I agree. I think @kinyoklion and @WeihanLi might have a better answer to it. I cannot see any possible breaking changes to this serialiser in the future (unless we add a new ValueType in the spec).

@WeihanLi
Copy link
Contributor Author

@askpt @toddbaert thanks very much for the review, it does contribute to the #440 and agree with For this I am happy to keep it in this PR and investigate it better in a separate effort., this introduces initial AOT support for the JSON source generator verification, think we could investigate better separately.

For the json converter, think we may need to confirm on the convert type name and namespace since it's going to be public, and maybe also the document comment, to avoid future breaking changes.

Also cc @kylejuliandev for a review and input.

@askpt askpt enabled auto-merge July 31, 2025 17:59
@askpt askpt added this pull request to the merge queue Jul 31, 2025
Merged via the queue into open-feature:main with commit e03aeba Jul 31, 2025
18 checks passed
This was referenced Dec 18, 2025
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.

[BUG] JSON source generators broken by 2.8.0

5 participants