Skip to content

Conversation

@hoc081098
Copy link
Member

@hoc081098 hoc081098 commented Apr 19, 2025

This pull request simplifies the EitherNes utility in the core module by removing unnecessary contracts and refactoring the zipOrAccumulateNonEmptySet function to leverage an existing zipOrAccumulate implementation. Additionally, unused imports and internal properties have been removed to clean up the codebase.

Refactoring and simplification:

  • core/src/main/java/com/hoc/flowmvi/core/EitherNes.kt: Refactored the zipOrAccumulateNonEmptySet function to delegate to the zipOrAccumulate function, removing the custom implementation and reducing redundancy. This change also eliminates the need for the count extension property and the ExperimentalContracts annotation.

Code cleanup:

@hoc081098 hoc081098 self-assigned this Apr 19, 2025
@hoc081098 hoc081098 requested a review from Copilot April 19, 2025 10:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the implementation of zipOrAccumulateNonEmptySet to simplify error accumulation by delegating to an underlying zipOrAccumulate helper.

  • Removed experimental contract usage and manual error accumulation logic.
  • Streamlined the function into a single-expression function using a combine lambda.
Comments suppressed due to low confidence (1)

core/src/main/java/com/hoc/flowmvi/core/EitherNes.kt:25

  • Ensure that the simplified implementation of zipOrAccumulateNonEmptySet is adequately covered by tests verifying that error accumulation behaves as expected when one or more inputs are Left values.
): EitherNes<E, Z> =

@hoc081098 hoc081098 enabled auto-merge April 19, 2025 10:23
@codecov
Copy link

codecov bot commented Apr 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.63%. Comparing base (895fe63) to head (d9673e9).
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #276   +/-   ##
=======================================
  Coverage   61.63%   61.63%           
=======================================
  Files          37       37           
  Lines        1100     1100           
  Branches      104      104           
=======================================
  Hits          678      678           
  Misses        408      408           
  Partials       14       14           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hoc081098 hoc081098 merged commit 7b5ff73 into master Apr 19, 2025
8 checks passed
@hoc081098 hoc081098 deleted the zipOrAccumulateNonEmptySet branch April 19, 2025 10:27
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.

2 participants