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

fix(pluto): Handle write operations inside FlatMap with Future #187

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

coveloper
Copy link

@coveloper coveloper commented Jan 21, 2025

Description:

Identus example app consistently throws a recursive save error when calling .sendMessage() as described in #183

Wrapping these .flatMap write operations in a Future seems to fix it in my example.
*note: If this is an acceptable fix, we might need to add another similar Future inside addMessages()'s .flatMap

Alternatives Considered (optional):

I had tried adding guard self.hasChanges else { return } on line 12 of NSManagedObjectContext+Save.swift but that didn't seem to have any effect on this issue.

Checklist:

  • My PR follows the contribution guidelines of this project
  • My PR is free of third-party dependencies that don't comply with the Allowlist
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked the PR title to follow the conventional commit specification

@coveloper coveloper requested a review from a team as a code owner January 21, 2025 08:16
@coveloper coveloper changed the title wrap flatMap write operation in Future fix(pluto): Handle write operations inside FlatMap with Future Jan 21, 2025
@coveloper
Copy link
Author

Looks like a test failed. Are these tests I can run locally as part of my future PRs? or do they only run on Actions?

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