Closed SlayerOrnstein closed 2 weeks ago
Today, hive
is still a much more popular package (just judging from the limited information available on pub.dev
.
Also, it's very easy for the hive_ce
users to use to override the dependency using dependency_overrides
.
Related to https://github.com/getsentry/sentry-dart/pull/2297 for another package from the same developer. In that PR I've suggested updating docs in the fork to instruct users to use the dependency override.
I don't believe it's desirable for the majority of users to do this change at the moment because it would break all existing hive
users using Sentry SDK, requiring them to change the dependency. Future will tell which package takes over the user-base and we should revisit this decision later.
Maintainer of hive_ce here. Hive is more popular because it has existed for 5 years, while my fork has only existed for 6 months. However, the last update for Hive was over 2 years ago, while my fork is actively maintained. The original Hive does not support WASM compilation, which is a big blocker for a lot of people and the main reason I created hive_ce.
It is not possible to use dependency overrides to replace hive with hive_ce in a project since the packages have different names.
Also, switching to hive_ce is not a breaking change. It looks like sentry_hive wraps the hive implementation, so how would migrating to hive_ce be breaking?
It would be breaking a breaking change to all users using sentry_hive, because after updating, they'd be required to change their dependency from hive to hive_ce
I made a mapping package to allow overriding hive
with hive_ce
. You can see how to use it in the Hive CE README: https://pub.dev/packages/hive_ce#workaround-for-transitive-hive-dependencies
Problem Statement
hive_ce
is a fork of hive that adds WASM support and it's more up to date then the current stablehive
version. It would also avoid having to add more dependencies sincehive
v4 is based onisar
and requiresisar_flutter_libs
Solution Brainstorm
Migrating from
hive
tohive_ce
seems to just be replacinghive
withhive_ce
in importsAre you willing to submit a PR?
Yes