algolia / algoliasearch-helper-flutter

⚡️ Building block to create instant-search applications with Flutter
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/flutter/
Other
21 stars 14 forks source link

Dependency Conflict with `algolia_helper` and `http` in `algolia_helper_flutter` #91

Closed AkshayND closed 9 months ago

AkshayND commented 11 months ago

Description:

I am currently using the algolia_helper_flutter package in my bizbhaarat project. During the installation of algolia_helper_flutter, I encountered a dependency version solving failure. The issue arises when I try to run flutter pub add algolia_helper_flutter.

As per my understanding, the algolia_helper_flutter package has different versions depending on various versions of algolia_helper.

For algolia_helper_flutter:

This results in a requirement of algolia_helper ^0.1.0 or >=0.2.0 <0.3.0 or ^0.3.2 for every version of algolia_helper_flutter.

Additionally, every version of algolia_helper depends on algolia ^1.1.1 which in turn depends on http ^0.13.0.

The problem arises as my project bizbhaarat depends on http ^1.0.0 and algolia_helper_flutter. The dependency version of http in bizbhaarat and algolia_helper_flutter are conflicting.

This leads to a version solving failure.

Expected Outcome:

Ideally, algolia_helper_flutter should be compatible with http ^1.0.0 or higher versions.

Actual Outcome:

algolia_helper_flutter is not compatible with http ^1.0.0 causing version solving failure.

Steps to reproduce:

  1. Create a new flutter project.
  2. Add http: ^1.0.0 and algolia_helper_flutter: any in the pubspec.yaml file.
  3. Run the flutter pub get command.
  4. Observe the version solving failure.

Please let me know if there is a workaround for this or if an update to address this issue is planned. Thank you for your assistance!

devprotec commented 11 months ago

I'm facing exactly the same issue here. My flutter pub get output looks like this:

[smart_tutor_gh_mobile] flutter pub get Resolving dependencies... Because algolia_helper_flutter >=0.2.1 <0.2.3 depends on algolia_helper ^0.2.1 and algolia_helper_flutter >=0.2.0 <0.2.1 depends on algolia_helper ^0.2.0, algolia_helper_flutter >=0.2.0 <0.2.3 requires algolia_helper ^0.2.0. And because algolia_helper_flutter >=0.2.3 <0.3.2 depends on algolia_helper ^0.2.3, algolia_helper_flutter >=0.2.0 <0.3.2 requires algolia_helper ^0.2.0. And because every version of algolia_helper depends on algolia ^1.1.1 which depends on http ^0.13.0, algolia_helper_flutter >=0.2.0 <0.3.2 requires http ^0.13.0. So, because smart_tutor_gh_mobile depends on both http ^1.1.0 and algolia_helper_flutter ^0.2.0, version solving failed. exit code 1

I've tried with different versions and I get almost the same thing.

ogimgio commented 10 months ago

found a solution?

AkshayND commented 10 months ago

No. I haven't

On Sat, Aug 19, 2023, 21:53 ogimgio @.***> wrote:

found a solution?

— Reply to this email directly, view it on GitHub https://github.com/algolia/algoliasearch-helper-flutter/issues/91#issuecomment-1685038755, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGBM5LGTMLFDIDSA4O6T3DXWDSB3ANCNFSM6AAAAAA2OHH2EA . You are receiving this because you authored the thread.Message ID: @.***>

bettkipronoh commented 10 months ago

In the mean time you can override http librabry like this

dependency_overrides:
  http: ^1.0.0
VladislavFitz commented 10 months ago

Thank you for reporting this. A new version of Algolia Helper for Flutter will be released in the coming days. It replaces the community Dart client with the official one made by Algolia. This new client doesn't depend on the http library, so this issue will be solved. Stay tuned!

VladislavFitz commented 10 months ago

A new release is now available. The issue might be fixed.

VladislavFitz commented 9 months ago

Closing, since there is no more http dependency.