marcglasberg / i18n_extension

Flutter package: Easy and powerful internationalization using Dart extensions.
Other
294 stars 64 forks source link

pub get fails with 4.2.0 depends on analyzer >=1.0.0 <3.0.0 #108

Closed pxsanghyo closed 2 years ago

pxsanghyo commented 2 years ago

for current version

name: i18n_extension
version: 4.2.0

environment:
  sdk: '>=2.15.0 <3.0.0'

dependencies:
  analyzer: ^3.0.0

so why am I getting this version solving failed message?

Because no versions of freezed match >1.1.1 <2.0.0 and freezed 1.1.1 depends on analyzer ^3.0.0, freezed ^1.1.1 requires analyzer ^3.0.0.

And because flutter_quill >=3.9.6 depends on i18n_extension ^4.2.0 which depends on analyzer >=1.0.0 <3.0.0, freezed ^1.1.1 is incompatible with flutter_quill >=3.9.6.

why does it say i18n_extension ^4.2.0 which depends on analyzer >=1.0.0 <3.0.0?

marcglasberg commented 2 years ago

This is a very weird error message. Doesn't seem related to i18n_extension, but rather a build problem. I have 2 suggestions for you.

hongfeiyang commented 2 years ago

I am getting the same issue

marcglasberg commented 2 years ago

@hongfeiyang Have you tried my 2 suggestions above? Also, are you in the stable channel? Can you do a flutter doctor and post the output here, please?

pxsanghyo commented 2 years ago

@marcglasberg By the way, thanks for your suggestions before. I tried them many times your first suggestion + other suggestions on stackoverflow but nothing worked. Your second suggestion works for now but I'm hoping for some real fix as is probably @hongfeiyang.

❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.2, on macOS 12.2.1 21D62 darwin-x64, locale en)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.57.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

I was on 2.8 (stable) before with the same problem.

hongfeiyang commented 2 years ago

@hongfeiyang Have you tried my 2 suggestions above? Also, are you in the stable channel? Can you do a flutter doctor and post the output here, please?

I am on flutter 2.10.2 stable. I know that dependency_override should work, I just hope that we have a better solution that this

marcglasberg commented 2 years ago

@hongfeiyang @pxsanghyo

I think I found the problem. Could you please test version 4.2.1?

hongfeiyang commented 2 years ago

@hongfeiyang @pxsanghyo

I think I found the problem. Could you please test version 4.2.1?

I can see that my analyser has been updated to 3.2.0. Thanks

image
pxsanghyo commented 2 years ago

@marcglasberg thanks I think it works. I'm not using this package directly. It's a dependency for flutter_quill.

this fails:

dependency_overrides:
  i18n_extension: 4.2.0

❯ flutter pub get
Because i18n_extension 4.2.0 depends on analyzer >=1.0.0 <3.0.0 and injectable_generator 1.5.3 depends on analyzer ^3.0.0
, i18n_extension 4.2.0 is incompatible with injectable_generator 1.5.3.
And because no versions of injectable_generator match >1.5.3 <2.0.0, i18n_extension 4.2.0 is incompatible with injectable
_generator ^1.5.3.

this works:

dependency_overrides:
  i18n_extension: 4.2.1
hongfeiyang commented 2 years ago

@marcglasberg thanks I think it works. I'm not using this package directly. It's a dependency for flutter_quill.

this fails:

dependency_overrides:
  i18n_extension: 4.2.0

❯ flutter pub get
Because i18n_extension 4.2.0 depends on analyzer >=1.0.0 <3.0.0 and injectable_generator 1.5.3 depends on analyzer ^3.0.0
, i18n_extension 4.2.0 is incompatible with injectable_generator 1.5.3.
And because no versions of injectable_generator match >1.5.3 <2.0.0, i18n_extension 4.2.0 is incompatible with injectable
_generator ^1.5.3.

this works:

dependency_overrides:
  i18n_extension: 4.2.1

Do a flutter pub upgrade and I think you won't need to override dependencies since flutter quill depends on ^4.2.0 not 4.2.0

pxsanghyo commented 2 years ago

@marcglasberg @hongfeiyang thanks it works