Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow custom build/link configuration, decouple core CLI infrastructure from code assets, data assets, ... #1643

Merged
merged 10 commits into from
Nov 4, 2024
5 changes: 5 additions & 0 deletions pkgs/native_assets_builder/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
consistency of the sum of those parts. Effectively this means: Any asset that
doesn't have an explicit linker will get a NOP linker that emits as outputs
it's inputs.
- **Breaking change** Removes knowledge about code & data assets from
`package:native_assets_builder`. Users of this package can know hook into the
build/link hook configuration that is used and e.g. initialize code
configuration. Similarly users of this package now have to provide a callback
to verify the consistency of the used hook configuration.

## 0.8.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class NativeAssetsBuildPlanner {
);
}

(List<Package> packages, bool success) plan({
List<Package>? plan({
String? runPackageName,
}) {
final PackageGraph packageGraph;
Expand All @@ -62,7 +62,6 @@ class NativeAssetsBuildPlanner {
final packagesToBuild = packageMap.keys.toSet();
final stronglyConnectedComponents = packageGraph.computeStrongComponents();
final result = <Package>[];
var success = true;
for (final stronglyConnectedComponent in stronglyConnectedComponents) {
final stronglyConnectedComponentWithNativeAssets = [
for (final packageName in stronglyConnectedComponent)
Expand All @@ -73,13 +72,13 @@ class NativeAssetsBuildPlanner {
'Cyclic dependency for native asset builds in the following '
'packages: $stronglyConnectedComponentWithNativeAssets.',
);
success = false;
return null;
} else if (stronglyConnectedComponentWithNativeAssets.length == 1) {
result.add(
packageMap[stronglyConnectedComponentWithNativeAssets.single]!);
}
}
return (result, success);
return result;
}
}

Expand Down
Loading