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

Delay constructing the config handle #455

Merged
merged 7 commits into from
Apr 11, 2022
Merged

Delay constructing the config handle #455

merged 7 commits into from
Apr 11, 2022

Conversation

nirinchev
Copy link
Member

This is a POC that delays constructing the native config until we actually get to open the Realm instance.

I think this is a cleaner approach for passing more complex data to native. We can use it for all config types (realm, sync, app) as well as for credentials.

@cla-bot cla-bot bot added the cla: yes label Apr 1, 2022
@coveralls
Copy link

coveralls commented Apr 1, 2022

Pull Request Test Coverage Report for Build 2114345458

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 91.841%

Totals Coverage Status
Change from base Build 2114305298: 0.0%
Covered Lines: 394
Relevant Lines: 429

💛 - Coveralls

@nirinchev nirinchev self-assigned this Apr 7, 2022
@nirinchev nirinchev marked this pull request as ready for review April 7, 2022 14:30
@nirinchev nirinchev requested a review from blagoev April 8, 2022 09:28
lib/src/configuration.dart Outdated Show resolved Hide resolved
lib/src/configuration.dart Show resolved Hide resolved
lib/src/native/realm_core.dart Show resolved Hide resolved
lib/src/configuration.dart Outdated Show resolved Hide resolved
@nirinchev
Copy link
Member Author

@blagoev updated API docs, but I'm not sure I have an idea for how a meaningful equality comparer would look like on the config, especially once we introduce callbacks for migration, compaction, and initial data.

@desistefanova I tend to agree with Lubo that the scheduler should be separate from the config, but it's possible I'm not seeing some elegant solution there. Feel free to ping me on slack if you feel strongly about it and we can look at it together.

@blagoev blagoev merged commit ad4ee95 into master Apr 11, 2022
@blagoev blagoev deleted the ni/dumb-config branch April 11, 2022 09:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants