Hi, guys any news about this aside for using dependencies override?
I have this issue after upgrading the flutter today.
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 psb_mobile_agent depends on both flutter_test any from sdk and hive_generator ^0.7.0, version solving failed.
Please use the latest version from Git.
dependencies:
hive:
hive_flutter:
git:
url: git://github.com/hivedb/hive.git
path: hive_flutter
dev_dependencies:
hive_generator:
git:
url: git://github.com/hivedb/hive.git
path: hive_generator
This works for you?
I get an error
[just_audio_service] flutter pub get
Running "flutter pub get" in just_audio_service...
Because every version of hive_generator from git depends on hive from hosted and just_audio_service depends on hive from git, hive_generator from git is forbidden.
So, because just_audio_service depends on hive_generator from git, version solving failed.
pub get failed (1; So, because just_audio_service depends on hive_generator from git, version solving failed.)
exit code 1
@yringler
It's not going to work with every dependency, just use dependency_overrides.
https://dart.dev/tools/pub/dependencies#dependency-overrides
Very cool, I didn't know about that. Thank you!
For the curious, here's a sample. Note that I specify a commit (the ref lines) to make sure there aren't any surprises, but those lines are optional. If you drop them, it'll pull from the latest changes on master.
dependency_overrides:
hive:
git:
url: https://github.com/hivedb/hive
path: hive
ref: d7ee72537a3b7ce1284bcbf5ee5f86e617a4f6fc
hive_generator:
git:
url: https://github.com/hivedb/hive
path: hive_generator
ref: d7ee72537a3b7ce1284bcbf5ee5f86e617a4f6fc
hive_flutter:
git:
url: https://github.com/hivedb/hive
path: hive_flutter
ref: d7ee72537a3b7ce1284bcbf5ee5f86e617a4f6fc
I've had the same problem! Thank you for this solution, it works.
Very cool, I didn't know about that. Thank you!
For the curious, here's a sample. Note that I specify a commit (the ref lines) to make sure there aren't any surprises, but those lines are optional. If you drop them, it'll pull from the latest changes on master.
dependency_overrides: hive: git: url: https://github.com/hivedb/hive path: hive ref: d7ee72537a3b7ce1284bcbf5ee5f86e617a4f6fc hive_generator: git: url: https://github.com/hivedb/hive path: hive_generator ref: d7ee72537a3b7ce1284bcbf5ee5f86e617a4f6fc hive_flutter: git: url: https://github.com/hivedb/hive path: hive_flutter ref: d7ee72537a3b7ce1284bcbf5ee5f86e617a4f6fc
This was super helpful ... thank you !
This issue is fixed with v1.4.2 update.
Most helpful comment
Please use the latest version from Git.