Skip to content

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

Closed
coveloper wants to merge 2 commits intohyperledger-identus:mainfrom
coveloper:jon/fix-cd-recursive-save
Closed

fix(pluto): Handle write operations inside FlatMap with Future#186
coveloper wants to merge 2 commits intohyperledger-identus:mainfrom
coveloper:jon/fix-cd-recursive-save

Conversation

@coveloper
Copy link
Copy Markdown
Contributor

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 January 21, 2025 07:44
@coveloper coveloper closed this Jan 21, 2025
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