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

Optimize and fix issues #206

Merged
merged 22 commits into from
Oct 6, 2024
Merged

Optimize and fix issues #206

merged 22 commits into from
Oct 6, 2024

Conversation

skarllot
Copy link
Owner

@skarllot skarllot commented Oct 6, 2024

Pull Request

The issue or feature being addressed

Details on the issue fix or feature implementation

  • Create benchmarks to assess basic formatting and parsing, including flags enumerations.
  • Add benchmark reports for formatting and parsing enumeration values.
  • The JSON converter now supports flags enumerations.
  • Only generate metadata classes when an EnumGeneratorAttribute is present.
  • Removed the Formatter and Parser classes to improve inlining and performance.
  • Added support for generating metadata for JSON-serialized values.
  • Organized interlocked generator code.
  • Implemented the ability to generate the ToJsonString extension method and variants of TryParseJsonString factory methods.
  • Added support for case-insensitive reading of JSON values on generated JSON converters.
  • Breaking Change: Removed parsing of comma-separated values for non-flag enumerations.

Confirm the following

  • I started this PR by branching from the head of the default branch
  • I have targeted the PR to merge into the default branch
  • I have included unit tests for the issue/feature
  • I have successfully run a local build

@skarllot skarllot linked an issue Oct 6, 2024 that may be closed by this pull request
Copy link

codecov bot commented Oct 6, 2024

Codecov Report

Attention: Patch coverage is 59.54357% with 195 lines in your changes missing coverage. Please review.

Project coverage is 50.50%. Comparing base (fc2c3c7) to head (098d37a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...eWriters/Extensions/FormatStringInternal.ttinclude 30.12% 57 Missing and 1 partial ⚠️
.../EnumUtilities.Generators/Models/EnumToGenerate.cs 20.00% 51 Missing and 1 partial ⚠️
...ors/CodeWriters/Factory/TryParseInternal.ttinclude 71.79% 16 Missing and 6 partials ⚠️
...rators/CodeWriters/EnumInfo/DefaultBlock.ttinclude 31.81% 14 Missing and 1 partial ⚠️
...tors/CodeWriters/Factory/EnumMemberBlock.ttinclude 0.00% 15 Missing ⚠️
gen/EnumUtilities.Generators/Models/EnumValue.cs 45.45% 11 Missing and 1 partial ⚠️
...ors/CodeWriters/Factory/DescriptionBlock.ttinclude 0.00% 10 Missing ⚠️
...s/CodeWriters/Extensions/EnumMemberBlock.ttinclude 0.00% 5 Missing ⚠️
...erators/CodeWriters/Extensions/JsonBlock.ttinclude 70.00% 0 Missing and 3 partials ⚠️
...tors/CodeWriters/Extensions/DefaultBlock.ttinclude 81.81% 0 Missing and 2 partials ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #206      +/-   ##
==========================================
+ Coverage   47.09%   50.50%   +3.41%     
==========================================
  Files          39       41       +2     
  Lines        1376     1388      +12     
  Branches      179      164      -15     
==========================================
+ Hits          648      701      +53     
+ Misses        665      625      -40     
+ Partials       63       62       -1     

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

@skarllot skarllot added the enhancement New feature or request label Oct 6, 2024
@skarllot skarllot merged commit 6581648 into main Oct 6, 2024
6 checks passed
@skarllot skarllot deleted the benchmark branch October 6, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request]: Support flags enum for JsonConverter
2 participants