larryaasen / upgrader

A Flutter package for prompting users to upgrade when there is a newer version of the app in the store.
MIT License
531 stars 262 forks source link

Please consider upgrading the dependencies to Dart3/Flutter 3.10.x, e.g. http -> 1.0.0 #290

Closed MagnusJohansson closed 1 year ago

MagnusJohansson commented 1 year ago

Upgrader v7.0.0 has a dependency on the older http v0.13.6. Now with Flutter 3.10/Dart3 we have a new http v1.0.0

Please consider upgrading to use that instead.

Because upgrader >=7.0.0 depends on http ^0.13.6 and my_app depends on http ^1.0.0, upgrader >=7.0.0 is forbidden.
So, because my_app depends on upgrader ^7.0.0, version solving failed.
exit code 1
larryaasen commented 1 year ago

Since package_info_plus depends on http: ">=0.13.5 <2.0.0", the http dependency cannot be upgraded to 1.0.0 yet.

MagnusJohansson commented 1 year ago

1.0.0 falls in between >= 0.13.5 and < 2.0.0 , so that shouldn't be a problem?

larryaasen commented 1 year ago

@MagnusJohansson After changing the upgrader pub.dev:

  http: ^1.0.0
  package_info_plus: ^4.0.1

This is what I get:

> flutter pub get
Resolving dependencies...
Because package_info_plus 4.0.1 depends on http ^0.13.5 and no versions of package_info_plus match >4.0.1 <5.0.0, package_info_plus ^4.0.1 requires http ^0.13.5.
So, because upgrader depends on both http 1.0.0 and package_info_plus ^4.0.1, version solving failed.
larryaasen commented 1 year ago

Actually, just upgrading these worked:

  device_info_plus: ^9.0.1
  package_info_plus: ^4.0.1
larryaasen commented 1 year ago

Version 7.0.1 is out with this change. https://pub.dev/packages/upgrader/versions/7.0.1

MagnusJohansson commented 1 year ago

I'm sorry, the package still has a hard dependency on the legacy http 0.13.6 , making it unusable for projects using the latest http 1.0.0. The mentioned dependency on package_info_plus 4.0.2 has http 1.0.0 already. So I'm not sure why this issue was closed? @larryaasen

https://github.com/larryaasen/upgrader/blob/e9919a9d2879fe0fd4f2ee9a78ce4e5ef95cf639/pubspec.yaml#LL21C3-L21C16

Made a PR: #292

larryaasen commented 1 year ago

@MagnusJohansson Version 7.0.2 should fix this, hopefully.