Description
Once pub supports path dependencies in pubspecs of git dependencies, we should change over the dependency on native_assets_builder and native_assets_cli to be git dependencies.
Blocked by:
This would enable doing breaking changes to native_assets_cli and consuming these breaking changes in native_assets_builder in a single atomic atomic step. cc @jonasfj @sigurdm
In turn this means we could stop building against both published and path dependencies on the repo here. cc @mosuem
It also means we completely stop publishing native_assets_builder (it's already listed hidden currently).
cc @mkustermann before addressing dart-lang/pub#449, we can't have a path dependency on from one package to another in a mono-repo and succeed resolving. (Unless we use dependency_overrides in flutter_tools.)
Alternatives:
- Merge packge_native_assets_builder into native_assets_cli but in a private library. (Downside:
pub get
will pull in all the builder code when users havebuild.dart
scripts.) - Use dependency overrides in flutter_tools.
- Stop letting native_assets_builder depend on native_assets_cli. Duplicate code where necessary. (Downsides: duplicated code. Harder to test serialization/deserialization. The
_builder
will serializeBuildConfig
and deserializeBuildOutput
, while the_cli
will deserializeBuildConfig
and serializeBuildOutput
)
This does not yet solve the issue of flutter_tools rolling into g3 separately from dartdev and g3 only having one copy of native_assets_builder (which force us to do any breaking changes in a multi step multi roll fashion). https://github.com/dart-lang/native/blob/main/pkgs/native_assets_builder/CONTRIBUTING.md#rolling