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

More Cats instances (for Chimney types, NOT Chimney instances for Cats data) #443

Merged
merged 16 commits into from
Jan 11, 2024

Conversation

MateuszKubuszok
Copy link
Member

@MateuszKubuszok MateuszKubuszok commented Dec 12, 2023

TODO:

  • add Transformer laws' tests
  • add PartialTransformer laws' tests
  • add partial.Result laws' tests
  • resplace individual toPartialResult extension methods with AsResult instances from partial.syntax
  • add documentation
    • pay special attention to sequential vs parallel semantics

This is probably a breaking change:

  • before partial.Result had only Applicative instance, which is now expanded to MonadError[partial.Result, partial.Result.Errors] & CoflatMap[partial.Result] & Traverse[partial.Result]
  • Applicative extends among others Semigroupal - the old Applicative had a parallel semantics
  • not that we expanded it to Monad and friends it has to be sequential (and monadic laws would check that most likely)
  • Semigroupal relies on parallel semantics - we can create a separate instance with a higher implicit priority and thus achieve source compatibility (and this makes tests pass again)
  • however the existing code compiled against applicativePartialResult implicit would have a changed behavior during eviction (one which fails fast and have less errors)
  • so it would be a change in the runtime behavior, affecting existing users, although not very bad one (same values would fail/pass as before, no linking errors)
  • nonetheless it would be safer to avoid merging this PR before next version is planned (e.g. 1.0.0-RC1)

@MateuszKubuszok MateuszKubuszok added breaking change Change resulting in compilation errors of code that used to be considered correct, or linking errors blocked Ticket cannot be implemented because it depends on another ticker or external factor labels Dec 12, 2023
@MateuszKubuszok MateuszKubuszok changed the title More cats instances More Cats instances Dec 12, 2023
@MateuszKubuszok MateuszKubuszok changed the title More Cats instances More Cats instances (for Chimney types, NOT Chimney instances for Cats data) Dec 13, 2023
@MateuszKubuszok MateuszKubuszok added this to the 1.0.0-RC milestone Dec 19, 2023
@MateuszKubuszok MateuszKubuszok changed the base branch from master to prepare-1-rc January 9, 2024 16:55
@MateuszKubuszok MateuszKubuszok marked this pull request as ready for review January 9, 2024 22:48
@MateuszKubuszok MateuszKubuszok changed the base branch from prepare-1-rc to master January 9, 2024 22:49
Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (688c760) 85.42% compared to head (f2c7730) 85.77%.

Files Patch % Lines
...chimney/cats/CatsPartialTransformerImplicits.scala 97.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #443      +/-   ##
==========================================
+ Coverage   85.42%   85.77%   +0.34%     
==========================================
  Files         122      124       +2     
  Lines        5180     5342     +162     
  Branches      205      213       +8     
==========================================
+ Hits         4425     4582     +157     
- Misses        755      760       +5     

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

@MateuszKubuszok MateuszKubuszok merged commit a7a899c into master Jan 11, 2024
13 of 14 checks passed
@MateuszKubuszok MateuszKubuszok deleted the more-cats branch January 11, 2024 11:08
@MateuszKubuszok MateuszKubuszok removed the blocked Ticket cannot be implemented because it depends on another ticker or external factor label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Change resulting in compilation errors of code that used to be considered correct, or linking errors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant