i18n icon indicating copy to clipboard operation
i18n copied to clipboard

`Version solving failed` for `intl: 0.19.0`

Open mosuem opened this issue 2 years ago • 14 comments

This is a pre-emptive issue thread, as we recently published a new version of package:intl. This results in the following error message, as long as Flutter has not updated their pinned version.

mosuem@mosuem:~/my_app$ flutter pub get
Resolving dependencies... (1.0s)
Note: intl is pinned to version 0.18.1 by flutter_localizations from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.


Because my_app depends on flutter_localizations from sdk which depends on intl 0.18.1, intl 0.18.1 is required.
So, because my_app depends on intl ^0.19.0, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on intl: flutter pub add intl:^0.18.1

See https://github.com/dart-lang/sdk/wiki/Flutter-Pinned-Packages for more information.

mosuem avatar Dec 07 '23 16:12 mosuem

Same here, when will flutter_localizations update to intl 0.19.0 ?

iKK001 avatar Dec 18 '23 11:12 iKK001

same problem

miguelangelflores1993 avatar Dec 18 '23 19:12 miguelangelflores1993

@mosuem Looking at changelog, 0.19.0 doesn't seem to have any braking changes compared to 0.18.1. Is this correct? Trying to figure out if a dependency override is a good temporary solution.

AlexDochioiu avatar Dec 20 '23 11:12 AlexDochioiu

hmm the release of intl 0.18.1 was 12 month ago, the release of intl 0.19.0 was 12 days ago. It is too hard for me to tell if there are breaking changes or not. (it does not seem to - but you have to test). Here the documentation of intl 0.19.0

And here the changelog of intl 0.19.0

Biggest change seems to me the change to Flutter-SDK 3.0.0.

iKK001 avatar Dec 20 '23 12:12 iKK001

@mosuem Looking at changelog, 0.19.0 doesn't seem to have any breaking changes compared to 0.18.1. Is this correct? Trying to figure out if a dependency override is a good temporary solution.

If something is a breaking change is hard to say - but a dependency override should be safe and would be my recommended course of action.

mosuem avatar Jan 02 '24 10:01 mosuem

Up, same problem! image

Sistem-Pack avatar Jan 16 '24 03:01 Sistem-Pack

One data point: I've been using a dependency override to pin intl to 0.19 for weeks in a complex app without issues.

lukemmtt avatar Jan 16 '24 03:01 lukemmtt

same problem.

because this issue, i've been stopped upgrade packages...

jungwoo-0530 avatar Feb 13 '24 04:02 jungwoo-0530

because this issue, i've been stopped upgrade packages...

Using a dependency override should work, as pointed out in earlier comments.

mosuem avatar Feb 13 '24 09:02 mosuem

@lukemmtt could you please provide some code example?

IAmJulianAcosta avatar Mar 10 '24 23:03 IAmJulianAcosta

@IAmJulianAcosta Just put this in your pubspec.yaml:

dependency_overrides:
  intl: 0.19.0

lukemmtt avatar Mar 10 '24 23:03 lukemmtt

@IAmJulianAcosta Just put this in your pubspec.yaml:

dependency_overrides:
  intl: 0.19.0

Keep in mind that overriding dependencies in publishable packages is not a good practice and in fact pub will alert you about that.

tomasweigenast avatar Apr 13 '24 13:04 tomasweigenast

Is the problem here that intl package hasn't reached a 1.0.0 release yet and so the bump from 0.18.x to 0.19.x is considered a potential breaking change per semver?

It seems crazy for the solution to be for so many projects to have to add a dependency override. It seems to me that everyone should be able to depend on intl ^1.0.0, including flutter_localizations, and then the incidence of this should be much reduced.

scopendo avatar Apr 25 '24 14:04 scopendo

I think 1.0.0 is not the issue - it would still break on major version revs, which the change to 0.19.0 was. In my opinion, the problem is in the Flutter way of pinning packages and the speed of how fast updates propagate.

mosuem avatar Apr 25 '24 15:04 mosuem