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

Another attempt to more generic solution to transformations of collections and options from outside of standard library #505

Merged
merged 33 commits into from
Apr 23, 2024

Conversation

MateuszKubuszok
Copy link
Member

@MateuszKubuszok MateuszKubuszok commented Apr 12, 2024

Replacement for #444

TODO:

  • create type classes representing: custom options, collections that can be always build, collections that are validated (integrations package)
  • add support for new types to ChimneyTypes (macros internals)
  • add support for summoning new type classes (macros internals)
  • use scala.collection.Map explicitly to make sure we are handling both mutable and immmutable maps
  • add support for IArray on Scala 3
  • build new structures abstracting away the code in macros from the implementation (like IterableOrArray) delegating to
    • new type classes
    • or stdlib types
  • update rules to use new structures instead of build-in types directly
    • start handling partially build collections in Maps and Iterables rules
  • tests
    • OptionalValue to/from, wrapping, unwrapping
    • flag OptionDefaultsToNone for OptionalValue[To, ?]
    • path _.foo.matchingSome.bar for OptionalValue[Foo, ?]
    • TotallyBuildIterable to/from
    • path _.foo.everyItem.bar for TotallyBuildIterable[Foo, ?]
    • PartiallyBuildIterable to/from
    • path _.foo.everyItem.bar for PartiallyBuildIterable[Foo, ?]
    • TODO: subtypes and handling of Totally/PartiallyBuildMaps
    • test mutable collections (Maps!)
    • test IArray on Scala 3
  • documentation

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

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

Project coverage is 88.06%. Comparing base (c1fa2e0) to head (cd1d846).

Files Patch % Lines
...er/rules/TransformProductToProductRuleModule.scala 72.22% 10 Missing ⚠️
...tion/transformer/integrations/OptionalValues.scala 78.04% 9 Missing ⚠️
...ey/internal/compiletime/ChimneyTypesPlatform.scala 70.37% 8 Missing ⚠️
...ernal/compiletime/datatypes/IterableOrArrays.scala 81.25% 6 Missing ⚠️
...ey/internal/compiletime/ChimneyExprsPlatform.scala 50.00% 6 Missing ⚠️
...ey/internal/compiletime/ChimneyTypesPlatform.scala 92.77% 6 Missing ⚠️
...nd/chimney/internal/compiletime/ChimneyExprs.scala 73.91% 6 Missing ⚠️
...scalaland/chimney/integrations/FactoryCompat.scala 63.63% 4 Missing ⚠️
...d/chimney/internal/compiletime/TypesPlatform.scala 76.92% 3 Missing ⚠️
...ransformer/rules/TransformMapToMapRuleModule.scala 92.85% 3 Missing ⚠️
... and 17 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #505      +/-   ##
==========================================
- Coverage   88.98%   88.06%   -0.93%     
==========================================
  Files         129      141      +12     
  Lines        5230     5530     +300     
  Branches      450      459       +9     
==========================================
+ Hits         4654     4870     +216     
- Misses        576      660      +84     

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

@MateuszKubuszok MateuszKubuszok changed the title Integrations 2 electric boogaloo Another attempt to more generic solution to transformations of collections and options from outside of standard library Apr 13, 2024
@MateuszKubuszok MateuszKubuszok force-pushed the integrations-2-electric-boogaloo branch from 547b893 to 36902e2 Compare April 19, 2024 21:45
@MateuszKubuszok MateuszKubuszok added this to the 1.0.0-RC milestone Apr 23, 2024
@MateuszKubuszok MateuszKubuszok marked this pull request as ready for review April 23, 2024 22:47
@MateuszKubuszok MateuszKubuszok merged commit 0a1b233 into master Apr 23, 2024
12 of 13 checks passed
@MateuszKubuszok MateuszKubuszok deleted the integrations-2-electric-boogaloo branch April 23, 2024 23:08
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.

1 participant