Skip to content

Commit e78459b

Browse files
dcharkesCommit Queue
authored andcommitted
[deps] Roll dart-lang/native
Change-Id: I77c3928e03a688443a2bb9c67c350b72a7ddd192 Cq-Include-Trybots: luci.dart.try:pkg-linux-debug-try,pkg-linux-release-arm64-try,pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-mac-release-try,pkg-win-release-arm64-try,pkg-win-release-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405360 Reviewed-by: Moritz Sümmermann <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
1 parent bb0cabb commit e78459b

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ vars = {
141141
"markdown_rev": "19aaded4300d24bedcbf52ade792b203ddf030b0",
142142
"material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e",
143143
# dart-native-interop-team@ is rolling breaking changes manually while the assets features are in experimental.
144-
"native_rev": "3ed5d3d07246cd792693584c2c42216739a634b7", # disable tools/rev_sdk_deps.dart
144+
"native_rev": "fe6ba55d16fe2354d90c73e7a8e7a021b77a884a", # disable tools/rev_sdk_deps.dart
145145
"protobuf_rev": "b7dd58cdbd879beee4c3fbf8ee80fce8e97bad26",
146146
"pub_rev": "710265bae23ad5860f33287fba10b5c369f19a93", # disable tools/rev_sdk_deps.dart
147147
"shelf_rev": "bf799519cda2898a7c5af06dcfdd5fe6443afd79",

pkg/dartdev/lib/src/native_assets.dart

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import 'package:logging/logging.dart';
1313
import 'package:native_assets_builder/native_assets_builder.dart';
1414
import 'package:native_assets_cli/code_assets_builder.dart';
1515
import 'package:native_assets_cli/data_assets_builder.dart';
16-
import 'package:native_assets_cli/native_assets_cli_internal.dart';
1716
import 'package:package_config/package_config.dart' as package_config;
1817

1918
import 'core.dart';
@@ -107,23 +106,10 @@ class DartNativeAssetsBuilder {
107106
}
108107

109108
Future<bool> warnOnNativeAssets() async {
110-
final workingDirectory = Directory.current.uri;
111-
112109
try {
113-
final packageLayout = await PackageLayout.fromWorkingDirectory(
114-
_fileSystem,
115-
workingDirectory,
116-
runPackageName,
117-
);
118-
final packagesWithNativeAssets = [
119-
...await packageLayout.packagesWithAssets(Hook.build),
120-
...await packageLayout.packagesWithAssets(Hook.link)
121-
];
122-
if (packagesWithNativeAssets.isEmpty) {
123-
return false;
124-
}
125-
final packageNames =
126-
packagesWithNativeAssets.map((p) => p.name).join(' ');
110+
final builder = await _nativeAssetsBuildRunner;
111+
final packageNames = await builder.packagesWithBuildHooks();
112+
if (packageNames.isEmpty) return false;
127113
log.stderr(
128114
'Package(s) $packageNames require the native assets feature to be enabled. '
129115
'Enable native assets with `--enable-experiment=native-assets`.',
@@ -141,7 +127,8 @@ class DartNativeAssetsBuilder {
141127
Future<BuildResult?> _buildNativeAssetsShared({
142128
required bool linkingEnabled,
143129
}) async {
144-
final buildResult = await (await _nativeAssetsBuildRunner).build(
130+
final builder = await _nativeAssetsBuildRunner;
131+
final buildResult = await builder.build(
145132
inputCreator: () => BuildInputBuilder()
146133
..config.setupCode(
147134
targetOS: target.os,
@@ -177,7 +164,8 @@ class DartNativeAssetsBuilder {
177164
required String? recordedUsagesPath,
178165
required BuildResult buildResult,
179166
}) async {
180-
final linkResult = await (await _nativeAssetsBuildRunner).link(
167+
final builder = await _nativeAssetsBuildRunner;
168+
final linkResult = await builder.link(
181169
inputCreator: () => LinkInputBuilder()
182170
..config.setupCode(
183171
targetOS: target.os,

0 commit comments

Comments
 (0)