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

feat: support nested generic type parameters for generic mappings #1199

Merged
merged 1 commit into from Mar 27, 2024

Conversation

latonz
Copy link
Contributor

@latonz latonz commented Mar 25, 2024

Improves the generic type handling. This allows to have nested and recursive generic types.

  • support more type parameter constructs for generic mappings such as nested generic types
  • emit a new diagnostic (RMG069, warning) for runtime target type mappings which do not match any mapping
  • add null arm to runtime target type mappings only if source type is nullable

Fixes #625
Fixes #968
Fixes #1188

@latonz latonz self-assigned this Mar 25, 2024
@latonz latonz force-pushed the 625-nested-generic-object-factories-2 branch 2 times, most recently from ade566d to 2bef438 Compare March 26, 2024 21:21
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 96.07843% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 91.33%. Comparing base (f08b7b4) to head (f6ec9af).

Files Patch % Lines
src/Riok.Mapperly/Helpers/GenericTypeChecker.cs 95.61% 2 Missing and 3 partials ⚠️
src/Riok.Mapperly/Helpers/SymbolExtensions.cs 83.33% 3 Missing and 1 partial ⚠️
...iok.Mapperly/Descriptors/Mappings/MethodMapping.cs 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1199      +/-   ##
==========================================
+ Coverage   91.28%   91.33%   +0.05%     
==========================================
  Files         234      234              
  Lines        8086     8218     +132     
  Branches     1011     1026      +15     
==========================================
+ Hits         7381     7506     +125     
- Misses        456      464       +8     
+ Partials      249      248       -1     

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

* support more type parameter constructs for generic mappings such as nested generic types
* emit a new diagnostic (RMG069, warning) for runtime target type mappings which do not match any mapping
* add null arm to runtime target type mappings only if source type is nullable
@latonz latonz force-pushed the 625-nested-generic-object-factories-2 branch from 2bef438 to f6ec9af Compare March 27, 2024 03:16
@latonz latonz marked this pull request as ready for review March 27, 2024 03:16
@latonz latonz enabled auto-merge (squash) March 27, 2024 03:31
@latonz latonz requested a review from ni507 March 27, 2024 03:31
@latonz latonz merged commit 1e78844 into riok:main Mar 27, 2024
19 checks passed
@latonz latonz deleted the 625-nested-generic-object-factories-2 branch March 27, 2024 07:41
Copy link

🎉 This PR is included in version 3.5.0-next.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants