media-kit / media-kit

A cross-platform video player & audio player for Flutter & Dart.
https://github.com/media-kit/media-kit
MIT License
893 stars 126 forks source link

Upgrade Wakelock dependency version #794

Closed moshOntong-IT closed 3 weeks ago

moshOntong-IT commented 3 weeks ago

I have this issue:

    Because every version of file_management from git depends on video_player_media_kit ^1.0.5 which depends on
      media_kit_video ^1.2.4, every version of file_management from git requires media_kit_video ^1.2.4.
(1) So, because media_kit_video >=1.1.0 depends on wakelock_plus ^1.1.1, every version of file_management from git requires
      wakelock_plus ^1.1.1.

    Because wakelock_plus <1.1.2 depends on package_info_plus ^4.0.2 and wakelock_plus >=1.1.2 <1.1.3 depends on
      package_info_plus >=4.0.2 <6.0.0, wakelock_plus <1.1.3 requires package_info_plus >=4.0.2 <6.0.0.
    And because wakelock_plus >=1.1.3 <1.1.4 depends on package_info_plus ^4.2.0, wakelock_plus <1.1.4 requires
      package_info_plus >=4.0.2 <6.0.0.
    And because wakelock_plus >=1.1.4 <1.2.0 depends on package_info_plus >=4.0.2 <6.0.0 and wakelock_plus >=1.2.0 <1.2.2
      depends on package_info_plus >=4.0.2 <7.0.0, wakelock_plus <1.2.2 requires package_info_plus >=4.0.2 <7.0.0.
    And because wakelock_plus >=1.2.2 <1.2.4 depends on package_info_plus ^6.0.0 and wakelock_plus >=1.2.4 depends on
      package_info_plus >=6.0.0 <8.0.0, every version of wakelock_plus requires package_info_plus >=4.0.2 <8.0.0.
    And because every version of file_management from git requires wakelock_plus ^1.1.1 (1), every version of file_management
      from git requires package_info_plus >=4.0.2 <8.0.0.
    And because appwrite >=12.0.3 depends on package_info_plus ^8.0.0, file_management from git is incompatible with appwrite
      >=12.0.3.
    So, because educanet depends on both appwrite ^12.0.3 and file_management from git, version solving failed.

In summary, I am using appwrite, which appwrite 12.0.3 depends on package info plus: 8.0.0 while our latest version of media_kit_video depends on wakelock 1.1.1. Then the wakelock 1.1.1 depends on package_info_plus: ^4.0.2. In result this is incompatible, I think we need to update the wakelock 1.1.1 into the latest version. I cant downgrade the appwrite since they have this latest query that I need to use.

abdelaziz-mahdy commented 3 weeks ago

this is the fix for your problem https://github.com/fluttercommunity/wakelock_plus/pull/52 in our case the version update wont fix your issue.

moshOntong-IT commented 3 weeks ago

If that PR from wakelock package merged thrb I think this package need to update the dependency of wakelock in media kit video pub

abdelaziz-mahdy commented 3 weeks ago

No need to do so, pub will auto handle it and give you the last version, since it will be the compatible one

abdelaziz-mahdy commented 3 weeks ago

Using ^ gives you the compatible version as long as it's not a major change

So as long as wakelock didn't increase the first number of their version it will work

Example

Will work no need for us to update: 1.2.4 to (1.2.5 or 1.3.0)

1.2.4 to 2.0.0 will not work and will need an update from our side

moshOntong-IT commented 3 weeks ago

ohh I see thank your for the informative message😊