Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.18.0, Version solving failed #458

Closed
bilalsammour opened this issue Dec 17, 2022 · 31 comments
Closed

0.18.0, Version solving failed #458

bilalsammour opened this issue Dec 17, 2022 · 31 comments
Labels
P2 A bug or feature request we're likely to work on package:intl type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@bilalsammour
Copy link

Describe the bug
When upgrading to 0.18.0, I get the following error:

[APP_NAME] flutter pub get
Running "flutter pub get" in APP_NAME...                          
Because APP_NAME depends on flutter_localizations from sdk which depends on intl 0.17.0, intl 0.17.0 is required.
So, because APP_NAME depends on intl ^0.18.0, version solving failed.
pub get failed (1; So, because APP_NAME depends on intl ^0.18.0, version solving failed.)
exit code 1

To Reproduce

  • Upgrade intl to 0.18.0.
  • Run flutter pub get

System info
Can not, because flutter pub get failed.

Versions

  • Flutter: 3.3.10
  • environment sdk: ">=2.18.6 <3.0.0"
  • flutter_localizations: sdk: flutter
@mosuem
Copy link
Member

mosuem commented Dec 19, 2022

Thanks for posting this; the intl package version needs to be revved in flutter_localizations.

@mosuem mosuem added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P2 A bug or feature request we're likely to work on labels Dec 19, 2022
@marcellocamara
Copy link

I have a similar issue when I tried to upgrade it to the version 0.18.0:

Because firebase_auth 4.2.0 depends on firebase_auth_web ^5.2.0 which depends on intl ^0.17.0, firebase_auth 4.2.0 requires intl ^0.17.0.
So, because APP_NAME depends on both intl ^0.18.0 and firebase_auth 4.2.0, version solving failed.
pub get failed (1; So, because worldcup depends on both intl ^0.18.0 and firebase_auth 4.2.0, version solving failed.)

My config:

environment:
  sdk: '>=2.18.6 <3.0.0'
  flutter: '3.3.10'

@mosuem
Copy link
Member

mosuem commented Jan 4, 2023

There seem to be some issues on the flutter side, see flutter/flutter#117163.

@mosuem
Copy link
Member

mosuem commented Feb 10, 2023

This seems to be fixed now!

@mosuem mosuem closed this as completed Feb 10, 2023
@bilalsammour
Copy link
Author

No, it is still.
Why is this issue closed?

@mosuem
Copy link
Member

mosuem commented Feb 10, 2023

Are you sure? flutter_localizations depends on intl 0.18.0 now, so it should be fine.

@marcellocamara
Copy link

I still have this issue using firebase_auth with intl.

I'm stuck on firebase_auth: ^4.2.2 because if I update it I get this error message:

Because firebase_auth >=4.2.6 depends on firebase_auth_web ^5.2.5 which depends on intl ^0.17.0, firebase_auth >=4.2.6 requires intl ^0.17.0.
So, because MY_APP depends on both intl ^0.18.0 and firebase_auth ^4.2.6, version solving failed.
pub get failed

Environment:

environment:
  sdk: '>=2.19.1 <3.0.0'
  flutter: '3.7.1'

@bilalsammour
Copy link
Author

Yes, this is the error

[APP_NAME] flutter pub get
Running "flutter pub get" in APP_NAME...
Resolving dependencies...
Because APP_NAME depends on flutter_localizations from sdk which depends on intl 0.17.0, intl 0.17.0 is required.
So, because APP_NAME depends on intl ^0.18.0, version solving failed.
pub get failed

@mosuem
Copy link
Member

mosuem commented Feb 13, 2023

Maybe this is a Flutter SDK versioning thing? I am not expert on Flutter, but would expect some delay between the error being fixed on GitHub and being rolled out. @thkim1011

@Rexios80
Copy link

Does version 0.18.0 actually contain breaking changes from 0.17.0? If not, it should have been released as 0.17.1. The best solution to prevent this confusion in the future is to make the next release 1.0.0 so that minor version changes aren't treated as breaking by dependency resolution.

@Rexios80
Copy link

Also for anyone having issues with dependency resolution, if version 0.18.0 doesn't contain breaking changes you can just add intl to your dependency_overrides:

dependency_overrides:
  intl: ^0.18.0

@mosuem
Copy link
Member

mosuem commented Feb 27, 2023

@Rexios80: There were some minor changes to the API. The switch to 0.18.0 was also made to keep the versions of intl and intl_translation in sync, the latter being migrated to null safety, to indicate that these packages are supported and alive and well :)

Sorry for the bugs caused by this. We/I will try to avoid this in the future.

@under3415
Copy link

Hi, we cannot upgrade to the latest version of intl. This is still an ongoing issue. Why is this closed?

@mosuem
Copy link
Member

mosuem commented Feb 28, 2023

Hi, this is fixed in Flutter HEAD, which is why the Flutter issue is closed. This one is still open for now.

@pavinod
Copy link

pavinod commented Mar 15, 2023

Also for anyone having issues with dependency resolution, if version 0.18.0 doesn't contain breaking changes you can just add intl to your dependency_overrides:

dependency_overrides:
  intl: ^0.18.0

Thanks @Rexios80 for this temporary workaround!

@under3415
Copy link

Hi, this is fixed in Flutter HEAD, which is why the Flutter issue is closed. This one is still open for now.

What is Flutter HEAD? Is that Flutter SDK? There have been a few releases and this is still not resolved.

I know it is unpopular asking for ETA, but do we know approximately when is this going to be resolved?

I am not sure if I can apply an override, not sure what the implications of doing that are.

@Rexios80
Copy link

Rexios80 commented Apr 3, 2023

What is Flutter HEAD?

The same thing as flutter channel master

I know it is unpopular asking for ETA, but do we know approximately when is this going to be resolved?

Probably the next major Flutter release at the latest

I am not sure if I can apply an override, not sure what the implications of doing that are.

The implications are your code will fail to build if any changes in intl actually break your dependencies. I've been running a pretty large-scale app in production with the override and haven't had any issues. If you're having issues resolving dependencies, you'll probably have better luck just using the override. The odds of bad behavior cropping up if you can build successfully are probably slim.

@mosuem mosuem transferred this issue from dart-archive/intl Apr 18, 2023
@under3415
Copy link

This is resolved in flutter 3.10.0, Yay, I can remove the override!

Although, now is complaining about version 0.18.1 :-)

Resolving dependencies...
Because app depends on flutter_localizations from sdk which depends on intl 0.18.0, intl 0.18.0 is required.
So, because app depends on intl ^0.18.1, version solving failed.
exit code 1

@umairali435
Copy link

Any updates regarding this issue because i don't have intl package in pubspec.yaml

@Rexios80
Copy link

Although, now is complaining about version 0.18.1 :-)

Flutter depends on exact versions of packages. It looks like you have intl: ^0.18.1 in your pubspec. You should have intl: ^0.18.0 instead.

@Prakkkmak
Copy link

I have similar issue too.
Flutter need 0.18.0
form_builder_validators needs 0.17.0
I can't use my project anymore :(

@keyfayaz
Copy link

Experiencing the same

@Rexios80
Copy link

@Prakkkmak @keyfayaz

dependency_overrides:
  intl: ^0.18.0

@devoncarew
Copy link
Member

devoncarew commented May 11, 2023

Hi - the new stable version of flutter - v3.10.0 - depends on package:intl 0.18.0 exactly (transitively, via package:flutter_localizations).

If you have a constraint on package:intl in your pubspec, and you're using this version of flutter, that constraint should allow the 0.18.0 version of intl; something like ^0.18.0.

If you're using a package that itself uses intl, that package needs to make sure that it allows the 0.18.0 version of intl. Please ping their issue tracker if that package does not yet support the necessary intl version.

If the package is unresponsive, or you can't otherwise solve the version constraint issue, you can try a dependency override. Note that you'll be selecting a version of intl that some package(s) in your package graph may not reliably work with.

dependency_overrides:
  intl: ^0.18.0

@devoncarew devoncarew pinned this issue May 11, 2023
@keyfayaz
Copy link

@Rexios80 this doesn't work because we use flutter_form_builder which depends on intl ^0.17.0 and other packages that depend on this main one. The override causes a different issue. Hoping that the recent Flutter (stable) update fixes this.

@profkaygee
Copy link

dependency_overrides:
intl: ^0.18.0

Where does one put this piece of code? I added it to the pubspec.yaml file but I get an error

Unexpected child "dependency_overrides" found under "flutter". Please correct the pubspec.yaml file at

Please assist me.

@mosuem
Copy link
Member

mosuem commented May 12, 2023

Hi @profkaygee , see the example at https://dart.dev/tools/pub/dependencies#dependency-overrides:

name: my_app
dependencies:
  transmogrify: ^1.2.0
dependency_overrides:
  transmogrify: '3.2.1'

@imboydc
Copy link

imboydc commented May 23, 2023

Resolving dependencies... (27.2s)
Because fstore depends on flux_firebase from path which depends on timeago 3.3.0, timeago 3.3.0 is
required.
So, because fstore depends on timeago 3.4.0, version solving failed.

@ahmedNagar123
Copy link

Because no versions of easy_localization match >3.0.2 <4.0.0 and easy_localization 3.0.2 depends on flutter_localizations from sdk, easy_localization ^3.0.2 requires flutter_localizations from sdk.
And because every version of flutter_localizations from sdk depends on intl 0.18.0, easy_localization ^3.0.2 requires intl 0.18.0.
So, because smart_hr depends on both intl ^0.18.1 and easy_localization ^3.0.2, version solving failed.

@mosuem
Copy link
Member

mosuem commented Jun 26, 2023

@ahmedNagar123 Try depending on intl: ^0.18.0 instead.

@mosuem mosuem closed this as completed Jun 26, 2023
@ahmedNagar123
Copy link

@ahmedNagar123 Try depending on intl: ^0.18.0 instead.

Thanks, it worked to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on package:intl type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests