Use case
Recently we upgraded from firebase_core 4.4.0 to 4.5.0. And we got the error on macos:
Failed to resolve dependencies Dependencies could not be resolved because 'firebase_crashlytics' depends on 'flutterfire' 4.5.0-firebase-core-swift and 'firebase_analytics' depends on 'flutterfire' 4.4.0-firebase-core-swift.
I tried everything:
- flutter clean
- removing build folder
- removing temporary folders in ios
- repair flutter packages cache
Reset package caches in XCode
Seemingly nothing worked.
Others had this problem, too, and I suspect the problem will appear on every firebase_core upgrade and their according packages:
firebase/flutterfire#17980
firebase/flutterfire#17962
I haven't tried to reproduce, but I will later (as its probably hard to reproduce), if it is feasable to add.
Proposal
I propose to add these command to the flutter clean command. So package maintainers don't need to bother searching how to resolve build issues:
rm -rf ~/Library/Developer/Xcode/DerivedData/Runner-*
rm -rf ~/Library/Caches/org.swift.swiftpm
|
help: 'When cleaning Xcode schemes, clean only the specified scheme.', |
Sorry for the vague feature request. I just want to write it down to help others and probably get more cases, where this can be useful, as I suspect most of people just do not write an issue, and go on after finding this:
firebase/flutterfire#17962 (comment)
Also by far not everyone uses SPM yet, so I suspect there will be more which are faced with this issue in the future.
The reason might also have to do how Firebase handles its dependencies, but I find it reasonable to have a way to get rid of all potentional pitfalls, which hinders on building successfully.
Edit: this happened on an ios build
Use case
Recently we upgraded from
firebase_core4.4.0to4.5.0. And we got the error on macos:I tried everything:
Reset package cachesin XCodeSeemingly nothing worked.
Others had this problem, too, and I suspect the problem will appear on every
firebase_coreupgrade and their according packages:firebase/flutterfire#17980
firebase/flutterfire#17962
I haven't tried to reproduce, but I will later (as its probably hard to reproduce), if it is feasable to add.
Proposal
I propose to add these command to the
flutter cleancommand. So package maintainers don't need to bother searching how to resolve build issues:flutter/packages/flutter_tools/lib/src/commands/clean.dart
Line 23 in 340ba4f
Sorry for the vague feature request. I just want to write it down to help others and probably get more cases, where this can be useful, as I suspect most of people just do not write an issue, and go on after finding this:
firebase/flutterfire#17962 (comment)
Also by far not everyone uses SPM yet, so I suspect there will be more which are faced with this issue in the future.
The reason might also have to do how Firebase handles its dependencies, but I find it reasonable to have a way to get rid of all potentional pitfalls, which hinders on building successfully.
Edit: this happened on an ios build