bizz84 / starter_architecture_flutter_firebase

Time Tracking app with Flutter & Firebase
https://codewithandrea.com/
MIT License
1.67k stars 458 forks source link

`flutter pub get` fails #95

Closed philipmjohnson closed 1 year ago

philipmjohnson commented 1 year ago

I just forked this repo, cloned, and ran flutter pub get.

Here is the error message:

/Users/philipjohnson/flutter/bin/flutter --no-color pub get
Running "flutter pub get" in flutter_starter_architecture_firebase...     
    Because test >=1.22.1 depends on test_api 0.4.17 and test >=1.22.0 <1.22.1 depends on test_api 0.4.16, test >=1.22.0 requires test_api 0.4.16 or 0.4.17.
(1) So, because test >=1.21.7 <1.22.0 depends on test_api 0.4.15 and test >=1.21.6 <1.21.7 depends on test_api 0.4.14, test >=1.21.6 requires test_api 0.4.14 or 0.4.15 or 0.4.16 or 0.4.17.

    Because test >=1.16.6 <1.16.7 depends on test_api 0.2.20 and test >=1.16.7 <1.17.0 depends on test_api 0.3.0, test >=1.16.6 <1.17.0 requires test_api 0.2.20 or 0.3.0.
    And because test >=1.17.0 <1.17.6 depends on test_api 0.4.0 and test >=1.21.2 <1.21.3 depends on test_core 0.4.14, test >=1.16.6 <1.17.6-∞ or >=1.21.2 <1.21.3-∞ requires test_api 0.2.20 or 0.3.0 or 0.4.0 or test_core 0.4.14.
    And because test >=1.20.0 <1.21.2 depends on test_api 0.4.9 and test >=1.19.4 <1.20.0 depends on test_api 0.4.8, test >=1.16.6 <1.17.6-∞ or >=1.19.4 <1.21.3-∞ requires test_api 0.2.20 or 0.3.0 or 0.4.0 or 0.4.8 or 0.4.9 or test_core 0.4.14.
    And because test >=1.19.3 <1.19.4 depends on test_api 0.4.7 and test >=1.19.0 <1.19.3 depends on test_api 0.4.6, test >=1.16.6 <1.17.6-∞ or >=1.19.0 <1.21.3-∞ requires test_api 0.2.20 or 0.3.0 or 0.4.0 or 0.4.6 or 0.4.7 or 0.4.8 or 0.4.9 or test_core 0.4.14.
    And because test >=1.18.1 <1.19.0 depends on test_api 0.4.5 and test >=1.18.0 <1.18.1 depends on test_api 0.4.4, test >=1.16.6 <1.17.6-∞ or >=1.18.0 <1.21.3-∞ requires test_api 0.2.20 or 0.3.0 or 0.4.0 or 0.4.4 or 0.4.5 or 0.4.6 or 0.4.7 or 0.4.8 or 0.4.9 or test_core 0.4.14.
    And because test >=1.17.11 <1.18.0 depends on test_api 0.4.3 and test >=1.17.10 <1.17.11 depends on test_api 0.4.2, test >=1.16.6 <1.17.6-∞ or >=1.17.10 <1.21.3-∞ requires test_api 0.2.20 or 0.3.0 or 0.4.0 or 0.4.2 or 0.4.3 or 0.4.4 or 0.4.5 or 0.4.6 or 0.4.7 or 0.4.8 or 0.4.9 or test_core 0.4.14.
    And because test >=1.17.6 <1.17.10 depends on test_api 0.4.1 and test >=1.16.0-nullsafety.19 <1.16.6 depends on test_api 0.2.19, test >=1.16.0-nullsafety.19 <1.21.3 requires test_api 0.2.19 or 0.2.20 or 0.3.0 or 0.4.0 or 0.4.1 or 0.4.2 or 0.4.3 or 0.4.4 or 0.4.5 or 0.4.6 or 0.4.7 or 0.4.8 or 0.4.9 or test_core 0.4.14.
    And because test >=1.21.3 <1.21.4 depends on test_core 0.4.15 and test >=1.21.4 <1.21.5 depends on test_core 0.4.16, test >=1.16.0-nullsafety.19 <1.21.5 requires test_api 0.2.19 or 0.2.20 or 0.3.0 or 0.4.0 or 0.4.1 or 0.4.2 or 0.4.3 or 0.4.4 or 0.4.5 or 0.4.6 or 0.4.7 or 0.4.8 or 0.4.9 or test_core 0.4.14 or 0.4.15 or 0.4.16.
    And because test >=1.21.6 requires test_api 0.4.14 or 0.4.15 or 0.4.16 or 0.4.17 (1), test >=1.16.0-nullsafety.19 <1.21.5-∞ or >=1.21.6 requires test_api 0.2.19 or 0.2.20 or 0.3.0 or 0.4.0 or 0.4.1 or 0.4.2 or 0.4.3 or 0.4.4 or 0.4.5 or 0.4.6 or 0.4.7 or 0.4.8 or 0.4.9 or 0.4.14 or 0.4.15 or 0.4.16 or 0.4.17 or test_core 0.4.14 or 0.4.15 or 0.4.16.
(2) So, because every version of flutter_driver from sdk depends on test_api 0.4.12 and test >=1.21.5 <1.21.6 depends on test_core 0.4.17, if flutter_driver from sdk and test >=1.16.0-nullsafety.19 then test_core 0.4.14 or 0.4.15 or 0.4.16 or 0.4.17.

    Because build_runner >=0.10.1 <1.12.0 depends on web_socket_channel ^1.0.9 and build_runner >=1.12.0 <2.1.0 depends on build >=2.0.0 <2.1.0, build_runner >=0.10.1 <2.1.0 requires web_socket_channel ^1.0.9 or build >=2.0.0 <2.1.0.
    And because build >=1.6.3 <2.0.3 depends on analyzer ^1.0.0, build_runner >=0.10.1 <2.1.0 requires web_socket_channel ^1.0.9 or analyzer ^1.0.0 or build >=2.0.3 <2.1.0.
    And because build >=2.0.3 <2.1.0 depends on analyzer >=1.0.0 <3.0.0 and test >=1.16.6 depends on web_socket_channel ^2.0.0, if build_runner >=0.10.1 <2.1.0 and test >=1.16.6 then analyzer >=1.0.0 <3.0.0.
    And because test_core >=0.4.13 <0.4.18 depends on analyzer >=3.3.0 <5.0.0 and test >=1.16.5 <1.16.6 depends on test_core 0.3.15, one of build_runner >=0.10.1 <2.1.0 or test_core >=0.4.13 <0.4.18 or test >=1.16.5 must be false.
    And because if flutter_driver from sdk and test >=1.16.0-nullsafety.19 then test_core 0.4.14 or 0.4.15 or 0.4.16 or 0.4.17 (2), one of flutter_driver from sdk or test >=1.16.5 or build_runner >=0.10.1 <2.1.0 must be false.
    And because starter_architecture_flutter_firebase depends on flutter_driver from sdk, test >=1.16.5 is incompatible with build_runner >=0.10.1 <2.1.0.
    So, because starter_architecture_flutter_firebase depends on both build_runner ^1.11.5 and test ^1.16.5, version solving failed.
pub get failed (1;     So, because starter_architecture_flutter_firebase depends on both build_runner ^1.11.5 and test ^1.16.5, version solving failed.)
Process finished with exit code 1

How should this be resolved?

philipmjohnson commented 1 year ago

So, after copious googling, as a workaround, I deleted the tests/ folder, which allowed me to get rid of all the pubspec.yml entries related to testing. I then had to add the pedantic package, and also adjust the Android manifest file to get rid of a warning. Here's the changes that result in a successful pub get:

https://github.com/philipmjohnson/flutter_starter_architecture_firebase/commit/dfe4afd6086071ee0d948c1056f92e25971890e1

I do see that you are working on a revised version of this package to fix package issues and incorporate some improvements. I would love to see this when it's ready.

Thanks for all your Flutter educational work. I think your posts and code are of very high quality.

philipmjohnson commented 1 year ago

And, after a bunch more editing, here is a running version:

https://github.com/philipmjohnson/flutter_starter_architecture_firebase

As noted above, it doesn't have any tests (which is really bad). I also needed to inline all your external packages, because the pubspec.yml files are all out of date with respect to the Firebase versions. Finally, I needed to edit the Podfile iOS version number.

I also used the Get to Know Firebase for Flutter instructions for configuring Firebase:

https://firebase.google.com/codelabs/firebase-get-to-know-flutter#2

Anyway, this is enough to give me some working example code for Firebase+Riverpod, which is what my goal was. I look forward to seeing what you come up with when you revise this package.

bizz84 commented 1 year ago

Closing following changes in https://github.com/bizz84/starter_architecture_flutter_firebase/pull/94.

Feel free to open new issues if needed.

There's a new tracking issue for test coverage here: #97