segmentio/analytics_flutter

Avoid using ^ in pubspec.yaml

kuznetsov-from-wonderland opened this issue · 6 comments

Hey, segment flutter developers

Once again we're seing an issue

make pg
fvm flutter pub get
Resolving dependencies...
Because merchant_app depends on analytics from git which depends on uuid ^4.0.0, uuid ^4.0.0 is required.
So, because merchant_app depends on uuid 3.0.7, version solving failed.

That happens because you use ^ notation in your pubspec.yaml and do not pin your dependencies. Why don't you mind pinning specific versions?

Sad trueth is - this package is the worst maintained enterprise package I ever worked with.

Hi @kuznetsov-from-wonderland thank you for your report, we start looking into this.

The cause of the issue here is not the ^, which is standard in Flutter packages. The root cause of the issue is that the merchant_app is fixed to uuid version 3. To resolve the issue, you should update your merchant_app to uuid v4.

Hi @edsonjab, @maxlapides

Is it ok to depends on both uuid 3 & 4 like so?
uuid: '>=3.0.0 <5.0.0'

So many popular flutter & dart packages depends on uuid: ^3.0.0

Because every version of analytics from git depends on uuid ^4.0.0 and sentry 7.10.1 depends on uuid ^3.0.0, analytics from git is incompatible with sentry 7.10.1.

Because share_plus_platform_interface 3.3.0 depends on uuid ^3.0.7 and no versions of share_plus_platform_interface match >3.3.0 <4.0.0, share_plus_platform_interface ^3.3.0 requires uuid ^3.0.7.
And because every version of analytics from git depends on uuid ^4.0.0, analytics from git is incompatible with share_plus_platform_interface ^3.3.0.

Try adding this to your pubspec.yaml file:

dependency_overrides:
  uuid: ^4.0.0