hive icon indicating copy to clipboard operation
hive copied to clipboard

hive_flutter uses too old version of path, so it does not build on Flutter master 1.18.0-6.0.pre.64

Open rydmike opened this issue 6 years ago • 19 comments

Just upgraded to latest version on Flutter master channel and hive_flutter did not like it, the build bombs due to, too old version of "path":

Because every version of flutter_test from sdk depends on path 1.7.0 and hive_flutter 0.3.0+2 depends on path >=1.6.0 <1.7.0, flutter_test from sdk is incompatible with hive_flutter 0.3.0+2.

And because no versions of hive_flutter match >0.3.0+2 <0.4.0, flutter_test from sdk is incompatible with hive_flutter ^0.3.0+2.

So, because talo depends on both hive_flutter ^0.3.0+2 and flutter_test any from sdk, version solving failed. pub get failed (1; So, because talo depends on both hive_flutter ^0.3.0+2 and flutter_test any from sdk, version solving failed.)

Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel master, v1.18.0-6.0.pre.64, on Microsoft Windows [Version 10.0.18363.657], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.5.4) [√] Android Studio (version 3.6) [√] IntelliJ IDEA Community Edition (version 2019.2) [√] VS Code (version 1.44.1) [√] Connected device (4 available)

rydmike avatar Apr 17 '20 02:04 rydmike

any update on this issue?

iamEtornam avatar Apr 19 '20 19:04 iamEtornam

I have the same issue.

justoke avatar Apr 20 '20 15:04 justoke

https://github.com/hivedb/hive/pull/287 :neckbeard:

jibiel avatar Apr 23 '20 23:04 jibiel

Does anyone know if @leisim is ok? He's from Bavaria, the hardest-hit by coronavirus area of Germany. I hope he's doing fine.

Constans avatar Apr 25 '20 08:04 Constans

Can't we just use dependency_overrides: path: 1.7.0 ? I've done that and it works, for the moment...

LibertyWalk avatar Apr 30 '20 16:04 LibertyWalk

@LibertyWalk this is a terrible idea it's wreaking havoc for me. Any solution for this problem ?

nicolasvahidzein avatar May 08 '20 21:05 nicolasvahidzein

@LibertyWalk this is a terrible idea it's wreaking havoc for me. Any solution for this problem ?

@nicolasvahidzein, you can fork the hive project and change the path dependency in place on your account then use the packages from git like:

hive:
   git:
     url: git://github.com/your_user/hive.git
     path: hive
hive_flutter:
  git:
     url: git://github.com/your_user/hive.git
     path: hive_flutter

This is an alternate for dependency_overrides and will not impact other packages.

Constans avatar May 08 '20 22:05 Constans

#287 :neckbeard:

I'll just ask a rookie question: Can I manually change the pubspec.yaml of the local version I have of hive_flutter? or should I just fork it?

7arfoush avatar May 09 '20 01:05 7arfoush

This is the way to go indeed:

dependency_overrides: path: 1.7.0

thanks @LibertyWalk Daniel, i apologize for what i said earlier. I did have to rebuild my entire project from a new flutter 1.17 blank project.

nicolasvahidzein avatar May 09 '20 03:05 nicolasvahidzein

Any news to update the package?

Katekko avatar May 19 '20 20:05 Katekko

For me overriding the path dependency works:

dependencies:
  flutter:
    sdk: flutter
  dio: ^3.0.9
  hive_flutter: ^0.3.0+2
  hive: ^1.4.1+1
  path: ^1.7.0

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3

dependency_overrides:
  path: ^1.6.4

dev_dependencies:
  flutter_test:
    sdk: flutter
  hive_generator: ^0.7.0+2
  build_runner: ^1.10.0

jaydangar avatar May 26 '20 05:05 jaydangar

For me overriding the path dependency works:

dependencies:
  flutter:
    sdk: flutter
  dio: ^3.0.9
  hive_flutter: ^0.3.0+2
  hive: ^1.4.1+1
  path: ^1.7.0

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3

dependency_overrides:
  path: ^1.6.4

dev_dependencies:
  flutter_test:
    sdk: flutter
  hive_generator: ^0.7.0+2
  build_runner: ^1.10.0

This got me sorted out! thank you!

EagleSigma avatar Jun 14 '20 21:06 EagleSigma

I get the following error using the above pubspec versions:

Missing concrete implementation of 'getter TypeAdapter.typeId'. Try implementing the missing method, or make the class abstract.

guit4eva avatar Jul 02 '20 15:07 guit4eva

For me overriding the path dependency works:

dependencies:
  flutter:
    sdk: flutter
  dio: ^3.0.9
  hive_flutter: ^0.3.0+2
  hive: ^1.4.1+1
  path: ^1.7.0

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3

dependency_overrides:
  path: ^1.6.4

dev_dependencies:
  flutter_test:
    sdk: flutter
  hive_generator: ^0.7.0+2
  build_runner: ^1.10.0

Thanks, Work for me!

fauzannoorazhar avatar Jul 08 '20 14:07 fauzannoorazhar

dependency_overrides - risk to have issues, hope hive will be fixed

zs-dima avatar Jul 08 '20 15:07 zs-dima

dependency_overrides: path: ^1.6.4

work with this. thx

x1q2q avatar Jul 12 '20 23:07 x1q2q

Hive installation is confusing & harder. if I override path version then it shows version error in dartx, if I override its version then it shows version error in characters. still, version issue is not cleared. please update the version of packages used in hive

anandsubbu007 avatar Jul 19 '20 08:07 anandsubbu007

Hive installation is confusing & harder. if I override path version then it shows version error in dartx, if I override its version then it shows version error in characters. still, version issue is not cleared. please update the version of packages used in hive

The same for me!!!

brunnohofmann avatar Aug 28 '20 11:08 brunnohofmann

Have you tried to upgrade to the latest version? Try running flutter pub outdated then flutter pub upgrade to get to the latest packages you depend on.

Constans avatar Aug 28 '20 11:08 Constans