diff --git a/pkgs/json_syntax_generator/lib/src/generator/normal_class_generator.dart b/pkgs/json_syntax_generator/lib/src/generator/normal_class_generator.dart index c52b14bf06..be0a507c96 100644 --- a/pkgs/json_syntax_generator/lib/src/generator/normal_class_generator.dart +++ b/pkgs/json_syntax_generator/lib/src/generator/normal_class_generator.dart @@ -210,8 +210,6 @@ static const ${tagProperty}Value = '$tagValue'; final superClassProperty = superclass?.getProperty(property.name); if (superClassProperty != null) { // This property will be already set in the super constructor. - // TODO: The parameter in the constructor currently has the super class - // property type. continue; } if (property.setterPrivate) { diff --git a/pkgs/native_assets_builder/test_data/complex_link/hook/build.dart b/pkgs/native_assets_builder/test_data/complex_link/hook/build.dart index 1f3012b043..81d1857c49 100644 --- a/pkgs/native_assets_builder/test_data/complex_link/hook/build.dart +++ b/pkgs/native_assets_builder/test_data/complex_link/hook/build.dart @@ -32,8 +32,6 @@ void main(List args) async { ? ToLinkHook(packageName) : const ToAppBundle(), ); - // TODO(https://github.com/dart-lang/native/issues/1208): Report - // dependency on asset. output.addDependency(dataAsset.uri); } }); diff --git a/pkgs/native_assets_builder/test_data/complex_link_helper/hook/build.dart b/pkgs/native_assets_builder/test_data/complex_link_helper/hook/build.dart index 17ad3e52fd..907951a0a3 100644 --- a/pkgs/native_assets_builder/test_data/complex_link_helper/hook/build.dart +++ b/pkgs/native_assets_builder/test_data/complex_link_helper/hook/build.dart @@ -33,8 +33,6 @@ void main(List args) async { ? const ToLinkHook('complex_link') : const ToAppBundle(), ); - // TODO(https://github.com/dart-lang/native/issues/1208): Report - // dependency on asset. output.addDependency(dataAsset.uri); } }); diff --git a/pkgs/native_assets_builder/test_data/simple_link/hook/build.dart b/pkgs/native_assets_builder/test_data/simple_link/hook/build.dart index 1f3012b043..81d1857c49 100644 --- a/pkgs/native_assets_builder/test_data/simple_link/hook/build.dart +++ b/pkgs/native_assets_builder/test_data/simple_link/hook/build.dart @@ -32,8 +32,6 @@ void main(List args) async { ? ToLinkHook(packageName) : const ToAppBundle(), ); - // TODO(https://github.com/dart-lang/native/issues/1208): Report - // dependency on asset. output.addDependency(dataAsset.uri); } }); diff --git a/pkgs/native_assets_cli/example/build/download_asset/hook/build.dart b/pkgs/native_assets_cli/example/build/download_asset/hook/build.dart index 223de34ff9..6d8f161e88 100644 --- a/pkgs/native_assets_cli/example/build/download_asset/hook/build.dart +++ b/pkgs/native_assets_cli/example/build/download_asset/hook/build.dart @@ -11,12 +11,8 @@ import 'package:native_assets_cli/code_assets_builder.dart'; import 'package:native_assets_cli/native_assets_cli.dart'; void main(List args) async { - // TODO(https://github.com/dart-lang/native/issues/39): Use user-defines to - // control this instead. - const localBuild = false; - await build(args, (input, output) async { - // ignore: dead_code + final localBuild = input.userDefines['local_build'] as bool? ?? false; if (localBuild) { await runBuild(input, output); } else { diff --git a/pkgs/native_assets_cli/example/build/download_asset/pubspec.yaml b/pkgs/native_assets_cli/example/build/download_asset/pubspec.yaml index 9eb1803a75..45876e5f84 100644 --- a/pkgs/native_assets_cli/example/build/download_asset/pubspec.yaml +++ b/pkgs/native_assets_cli/example/build/download_asset/pubspec.yaml @@ -21,3 +21,11 @@ dev_dependencies: ffigen: ^18.0.0 lints: ^5.1.1 test: ^1.25.15 + +# Note: If pub workspaces are in use, the user-defines must be in the workspace +# pub file. These defines are only in effect if `resolution: workspace` above is +# removed. +hooks: + user_defines: + download_asset: # package name + local_build: false diff --git a/pkgs/native_assets_cli/example/link/package_with_assets/hook/build.dart b/pkgs/native_assets_cli/example/link/package_with_assets/hook/build.dart index 1f3012b043..81d1857c49 100644 --- a/pkgs/native_assets_cli/example/link/package_with_assets/hook/build.dart +++ b/pkgs/native_assets_cli/example/link/package_with_assets/hook/build.dart @@ -32,8 +32,6 @@ void main(List args) async { ? ToLinkHook(packageName) : const ToAppBundle(), ); - // TODO(https://github.com/dart-lang/native/issues/1208): Report - // dependency on asset. output.addDependency(dataAsset.uri); } }); diff --git a/pkgs/native_assets_cli/lib/src/config.dart b/pkgs/native_assets_cli/lib/src/config.dart index 53beb59be0..d696608967 100644 --- a/pkgs/native_assets_cli/lib/src/config.dart +++ b/pkgs/native_assets_cli/lib/src/config.dart @@ -127,7 +127,8 @@ extension type HookInputUserDefines._(HookInput _input) { if (pubspecSource != null) { sources.add(pubspecSource); } - // TODO: Add commandline arguments. + // TODO(https://github.com/dart-lang/native/issues/2215): Add commandline + // arguments. for (final source in sources) { final relativepath = source.defines[key]; if (relativepath is String) { diff --git a/pubspec.yaml b/pubspec.yaml index cf67dfebcd..c31c3f08fe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -62,6 +62,8 @@ workspace: # Hook user-defines are specified in the pub workspace. hooks: user_defines: + download_asset: + local_build: false user_defines: # package name user_define_key: user_define_value user_define_key2: