isar / isar/hive

Hive.close is not unregistering adapters

Open
#1,135 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

I want to close Hive temporarily to reinit Hive in another location with other Adapters. The only way I can do that is using the method "resetAdapters()", which docs says.

> /// Clears all registered adapters.
> ///
> /// To register an adapter use [registerAdapter].
> ///
> /// NOTE: [resetAdapters] also clears the default adapters registered
> /// by Hive.
> ///
> /// WARNING: This method is only intended to be used for integration and unit tests
> /// and SHOULD not be used in production code.

Is there an acceptable way to do that?

Thank you

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the implementations of Hive.close and resetAdapters, since the issue identifies both as relevant entry points. Determine whether closing Hive should unregister adapters so it can be reinitialized elsewhere without resetAdapters; done when that lifecycle behavior is defined and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.