I am trying to use hive on my project and getting this error:
Because hive_generator >=0.6.0 depends on dartx ^0.2.0 and mydenox_flutter depends on dartx ^0.3.0, hive_generator >=0.6.0 is forbidden.
So, because mydenox_flutter depends on hive_generator ^0.7.0+2, version solving failed.
pub get failed (1; So, because mydenox_flutter depends on hive_generator ^0.7.0+2, version solving failed.)
This is caused because hive_generator uses an old version of dartx
@shinayser I have a similar problem — hive_generator does not create the .g part at all, although there are no semantic/syntax errors.
This is using the sample project from the Hive docs, but it happens with other projects as well — latest Flutter and hive (running w/ latest Visual Studio Code on macOS).
Should I open a separate issue?
Thank you.
@adario definetly a separated issue. My issue happens even before compiling the project.
@shinayser you're right, of course — for some reason, a flutter clean was needed... not sure why, though.
Hi guys any news about this?
I have the same compatibility problem
Because no versions of hive_generator match >0.7.0+2 <0.8.0 and hive_generator 0.7.0+2 depends on dartx ^0.2.0, hive_generator ^0.7.0+2 requires dartx ^0.2.0.
And because no versions of dartx match >0.2.0 <0.3.0, hive_generator ^0.7.0+2 requires dartx 0.2.0.
And because dartx 0.2.0 depends on characters ^0.3.0 and lottie >=0.3.0+1 depends on characters ^0.5.0, hive_generator ^0.7.0+2 is incompatible with lottie >=0.3.0+1.
I think that I have the same problem here.
Running "flutter pub get" in app...
Because hive_generator >=0.6.0 depends on dartx ^0.2.0 which depends on quiver >=2.0.3 <2.1.0, hive_generator >=0.6.0 requires quiver >=2.0.3 <2.1.0.
And because every version of flutter_test from sdk depends on quiver 2.1.3, hive_generator >=0.6.0 is incompatible with flutter_test from sdk.
So, because app depends on both flutter_test any from sdk and hive_generator ^0.6.0, version solving failed.
pub get failed (1; So, because app depends on both flutter_test any from sdk and hive_generator ^0.6.0, version solving failed.)
As a temporary workaround, I'm using:
dependency_overrides:
dartx: ^0.3.0
As you can find here: https://github.com/hivedb/hive/issues/203#issuecomment-580364398
Assuming dartx doesn't contain breaking changes (like, _removing_ features) up to its 1.0.0 release, hive_generator could depend on dartx: >= 0.2.0 < 1.0.0, making itself independent from the minor releases of dartx.
Is there any update on this? I'd love to use this package on my app but I cannot with this current issue
To anyone joining this issue thread just now: Three PRs have already been opened (#277, #318, #320) trying to fix this — please don't write yet another one. 😅
@ElZombieIsra It seems like package maintainer @leisim has shift priorities for the moment, but will be back soon. Then, a new version can be published.
While using dependency_overrides in production code is dangerous (because you're forcing possibly incompatible packages together), note that you can also always depend on one of the forks using git, which is safe as far as package-resolution goes.
After adding:
dependency_overrides:
dartx: ^0.3.0
I'm getting the following error:
Because dartx >=0.2.0 <0.4.0 depends on characters ^0.3.0 and every version of flutter_test from sdk depends on characters 1.0.0, dartx >=0.2.0 <0.4.0 is incompatible with flutter_test from sdk.
So, because my_app depends on both flutter_test any from sdk and dartx ^0.3.0, version solving failed.
Any assistance would be greatly appreciated!
After adding:
dependency_overrides: dartx: ^0.3.0I'm getting the following error:
Because dartx >=0.2.0 <0.4.0 depends on characters ^0.3.0 and every version of flutter_test from sdk depends on characters 1.0.0, dartx >=0.2.0 <0.4.0 is incompatible with flutter_test from sdk. So, because my_app depends on both flutter_test any from sdk and dartx ^0.3.0, version solving failed.Any assistance would be greatly appreciated!
dependency_overrides:
dartx: ^0.3.0
collection: ^1.14.13
characters: ^0.3.0
This is working for me
Most helpful comment
Assuming dartx doesn't contain breaking changes (like, _removing_ features) up to its 1.0.0 release, hive_generator could depend on
dartx: >= 0.2.0 < 1.0.0, making itself independent from the minor releases of dartx.