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

Customize field/subtype name comparison during macro expansion #478

Merged
merged 13 commits into from
Mar 24, 2024

Conversation

MateuszKubuszok
Copy link
Member

@MateuszKubuszok MateuszKubuszok commented Mar 13, 2024

TODO:

  • obtain object by its type in the macro (based on https://github.com/MateuszKubuszok/MacroTypeclass)
  • replace each usage of ProductTypes.areNamesEqual with ctx.config.flags.fieldNamesComparison
    • consider some utility which would provide global areFieldNamesEqual delegating to the code above
  • replace each usage of enumNamesEqual with ctx.config.flags.subtypeNamesComparison
    • consider some utility which would provide global areSubtypeNamesEqual delegating to the code above
  • tests
    • custom fields names matching
    • custom subtypes names matching
    • build-in comparators
    • error messages when a comparator cannot be read
  • mkdocs
    • enableFieldNamesMatching + disableFieldNamesMatching
    • enableSubtypeNamesMatching + dsableSubtypeNamesMatching
    • TransformedNamesComparison
  • scaladoc
    • TransformedNamesComparison
    • links to mkdocs

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

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

Project coverage is 90.02%. Comparing base (530d7fe) to head (c7aff77).

Files Patch % Lines
...ey/internal/compiletime/ChimneyTypesPlatform.scala 66.66% 4 Missing ⚠️
...io/scalaland/chimney/dsl/TransformerFlagsDsl.scala 50.00% 4 Missing ⚠️
...ey/internal/compiletime/ChimneyTypesPlatform.scala 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #478      +/-   ##
==========================================
+ Coverage   89.85%   90.02%   +0.17%     
==========================================
  Files         124      125       +1     
  Lines        4602     4663      +61     
  Branches      375      393      +18     
==========================================
+ Hits         4135     4198      +63     
+ Misses        467      465       -2     

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

@MateuszKubuszok MateuszKubuszok linked an issue Mar 24, 2024 that may be closed by this pull request
4 tasks
@MateuszKubuszok MateuszKubuszok marked this pull request as ready for review March 24, 2024 11:36
@MateuszKubuszok MateuszKubuszok merged commit 68380c2 into master Mar 24, 2024
23 checks passed
@MateuszKubuszok MateuszKubuszok deleted the custom-name-comparator branch March 24, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants