-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Currently, it is quite hard to share implementation between dartdev and flutter_tools.
- Dartdev outside g3 uses path dependencies via a DEPS file. Meaning that changes in multiple packages can be made in an atomic way.
- Dartdev inside g3 uses the same dependencies in g3, the packages in DEPS are rolled into g3 with the Dart roll.
- flutter_tools outside g3 uses published dependencies. This means that two helper packages in a mono_repo cannot be updated atomically. (For example
native_asset_cliis imported bynative_assets_builderbut they are in the same mono repo, meaning one always need to commit dependency, publish, commit dependee, publish.) - flutter_tools inside g3 uses the same packages as are rolled by the Dart SDK. Meaning that no breaking changes can be rolled in the Dart roll rolling these packages if the API is also used in flutter_tools.
This means that two helper packages in a mono_repo cannot be updated atomically.
We could solve this, if we would depend packages in mono repos by git dependencies and use dependency overrides or use path dependencies inside the mono repo after dart-lang/native#949 is addressed.
@stuartmorgan @christopherfujino So far I only see published dependencies in flutter_tools pubspec.yaml. Is git dependencies on mono repos something the Flutter team would consider?
flutter_tools inside g3 uses the same packages as are rolled by the Dart SDK. Meaning that no breaking changes can be rolled in the Dart roll rolling these packages if the API is also used in flutter_tools.
This could possibly be solved by either (a) having two copies of the packages in google3 @iinozemtsev, or (b) not building flutter_tools at all in g3, or (c) rolling Dart as part of the Flutter roll instead of separately [probably not feasible].
Maybe I'm holding it wrong, and code between dartdev and flutter_tools should be shared in a different way. I'm open to suggestions.
Relevant issue for native_assets_builder and native_assets_cli: