Skip to content

Fix an issue where the persistentContainer ivar isn't set - #19210

Merged
crazytonyli merged 1 commit into
trunkfrom
core-data-persistent-container
Aug 19, 2022
Merged

Fix an issue where the persistentContainer ivar isn't set#19210
crazytonyli merged 1 commit into
trunkfrom
core-data-persistent-container

Conversation

@crazytonyli

Copy link
Copy Markdown
Contributor

Changes

The _persistentStoreCoordinator instance variable is never assigned a value in its lazy getter. This is going to be an issue if the getter is called multiple times, which isn't the case now. But I wasted a few hours on this issue when making other changes.

Test instructions

Unit and UI test suite should be able to cover this change.

Regression Notes

  1. Potential unintended areas of impact
    None

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    None

  3. What automated tests I added (or what prevented me from doing so)
    None

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@crazytonyli
crazytonyli requested a review from a team August 18, 2022 21:22
@crazytonyli crazytonyli self-assigned this Aug 18, 2022
@crazytonyli crazytonyli added the Core Data Issues related to Core Data label Aug 18, 2022
@crazytonyli crazytonyli added this to the 20.6 milestone Aug 18, 2022
@wpmobilebot

Copy link
Copy Markdown
Contributor
You can test the changes in Jetpack from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr19210-9223f19 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@wpmobilebot

Copy link
Copy Markdown
Contributor
You can test the changes in WordPress from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr19210-9223f19 on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@mokagio mokagio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This definitely looks like the kind of tiny bug that would take ages to discover. Sorry you had to go through it, and thank you for shipping a fix. 🙇‍♂️

@crazytonyli
crazytonyli merged commit 4c4bc03 into trunk Aug 19, 2022
@crazytonyli
crazytonyli deleted the core-data-persistent-container branch August 19, 2022 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Core Data Issues related to Core Data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants