From 1508984809cc70f41c526f923eafdc707cf6ae67 Mon Sep 17 00:00:00 2001 From: Mauricio Galindo Date: Mon, 19 Sep 2022 14:49:32 -0700 Subject: [PATCH 1/7] [SNAP FORK][UPSTREAMED] enable support multiplex workers in busybox actions - Disable warnings for busybox actions Warnings go to stdout/stderr which makes it incompatible with workers --- rules/busybox.bzl | 77 ++++++++++++++++++++++++++++++++++++++++++----- rules/java.bzl | 12 +++++++- 2 files changed, 80 insertions(+), 9 deletions(-) diff --git a/rules/busybox.bzl b/rules/busybox.bzl index 195d80a11..9b44a2583 100644 --- a/rules/busybox.bzl +++ b/rules/busybox.bzl @@ -118,6 +118,10 @@ def _make_resources_flag( ], ) +def _disable_warnings(args): + # Disable warnings - this are output to stdin/stderr which breaks worker mode + args.add("--logWarnings=false") + def _path(f): return f.path @@ -281,7 +285,8 @@ def _package( transitive_input_files = [] args = ctx.actions.args() - args.use_param_file("@%s") + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "AAPT2_PACKAGE") args.add("--") args.add("--aapt2", aapt.executable) @@ -388,16 +393,20 @@ def _package( if java_package: args.add("--packageForR", java_package) + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, executable = busybox, - tools = [aapt], + tools = [aapt, busybox], arguments = [args], inputs = depset(input_files, transitive = transitive_input_files), outputs = output_files, mnemonic = "PackageAndroidResources", progress_message = "Packaging Android Resources in %s" % ctx.label, + supports_workers = True, + supports_multiplex_workers = True, ) def _parse( @@ -418,7 +427,8 @@ def _parse( host_javabase: Target. The host javabase. """ args = ctx.actions.args() - args.use_param_file("@%s") + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "PARSE") args.add("--") args.add( @@ -430,6 +440,8 @@ def _parse( ) args.add("--output", out_symbols) + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, @@ -439,6 +451,8 @@ def _parse( outputs = [out_symbols], mnemonic = "ParseAndroidResources", progress_message = "Parsing Android Resources in %s" % out_symbols.short_path, + supports_workers = True, + supports_multiplex_workers = True, ) def _make_merge_assets_flags(resources_node): @@ -484,7 +498,8 @@ def _merge_assets( host_javabase: Target. The host javabase. """ args = ctx.actions.args() - args.use_param_file("@%s") + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "MERGE_ASSETS") args.add("--") args.add("--assetsOutput", out_assets_zip) @@ -510,10 +525,13 @@ def _merge_assets( join_with = "&", ) + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, executable = busybox, + tools = [busybox], arguments = [args], inputs = depset( assets + [symbols], @@ -523,6 +541,8 @@ def _merge_assets( mnemonic = "MergeAndroidAssets", progress_message = "Merging Android Assets in %s" % out_assets_zip.short_path, + supports_workers = True, + supports_multiplex_workers = True, ) def _validate_and_link( @@ -562,7 +582,8 @@ def _validate_and_link( # Retrieves the list of files at runtime when a directory is passed. args = ctx.actions.args() - args.use_param_file("@%s") + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "LINK_STATIC_LIBRARY") args.add("--") args.add("--aapt2", aapt.executable) @@ -587,6 +608,8 @@ def _validate_and_link( args.add("--staticLibraryOut", out_file) output_files.append(out_file) + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, @@ -598,6 +621,8 @@ def _validate_and_link( mnemonic = "LinkAndroidResources", progress_message = "Linking Android Resources in " + out_file.short_path, + supports_workers = True, + supports_multiplex_workers = True, ) def _compile( @@ -627,7 +652,8 @@ def _compile( # Retrieves the list of files at runtime when a directory is passed. args = ctx.actions.args() - args.use_param_file("@%s") + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "COMPILE_LIBRARY_RESOURCES") args.add("--") args.add("--aapt2", aapt.executable) @@ -641,6 +667,8 @@ def _compile( ) args.add("--output", out_file) + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, @@ -651,6 +679,8 @@ def _compile( outputs = [out_file], mnemonic = "CompileAndroidResources", progress_message = "Compiling Android Resources in %s" % out_file.short_path, + supports_workers = True, + supports_multiplex_workers = True, ) def _make_merge_compiled_flags(resources_node_info): @@ -703,7 +733,8 @@ def _merge_compiled( transitive_input_files = [] args = ctx.actions.args() - args.use_param_file("@%s") + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "MERGE_COMPILED") args.add("--") args.add("--classJarOutput", out_class_jar) @@ -742,16 +773,21 @@ def _merge_compiled( ) transitive_input_files.append(transitive_compiled_resources) + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, executable = busybox, + tools = [busybox], arguments = [args], inputs = depset(input_files, transitive = transitive_input_files), outputs = output_files, mnemonic = "StarlarkMergeCompiledAndroidResources", progress_message = "Merging compiled Android Resources in " + out_class_jar.short_path, + supports_workers = True, + supports_multiplex_workers = True, ) def _escape_mv(s): @@ -812,6 +848,7 @@ def _merge_manifests( # Args for busybox args = ctx.actions.args() args.use_param_file("@%s", use_always = True) + args.set_param_file_format("multiline") args.add("--tool", "MERGE_MANIFEST") args.add("--") if manifest: @@ -834,15 +871,20 @@ def _merge_manifests( args.add("--log", out_log_file) outputs.append(out_log_file) + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, executable = busybox, + tools = [busybox], arguments = [args], inputs = depset(directs, transitive = transitives), outputs = outputs, mnemonic = "MergeManifests", progress_message = "Merging Android Manifests in %s" % out_file.short_path, + supports_workers = True, + supports_multiplex_workers = True, ) def _process_databinding( @@ -877,6 +919,8 @@ def _process_databinding( res_dirs = _get_unique_res_dirs(resource_files) args = ctx.actions.args() + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "PROCESS_DATABINDING") args.add("--") args.add("--output_resource_directory", databinding_resources_dirname) @@ -884,6 +928,8 @@ def _process_databinding( args.add("--dataBindingInfoOut", out_databinding_info) args.add("--appId", java_package) + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, @@ -893,6 +939,8 @@ def _process_databinding( outputs = [out_databinding_info] + out_databinding_processed_resources, mnemonic = "StarlarkProcessDatabinding", progress_message = "Processing data binding", + supports_workers = True, + supports_multiplex_workers = True, ) def _make_generate_binay_r_flags(resources_node): @@ -931,6 +979,8 @@ def _generate_binary_r( host_javabase: A Target. The host javabase. """ args = ctx.actions.args() + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "GENERATE_BINARY_R") args.add("--") args.add("--primaryRTxt", r_txt) @@ -950,17 +1000,21 @@ def _generate_binary_r( # TODO(b/154003916): support transitive "--library transitive_r_txt_path,transitive_manifest_path" flags args.add("--classJarOutput", out_class_jar) args.add("--targetLabel", str(ctx.label)) - args.use_param_file("@%s") + + _disable_warnings(args) _java.run( ctx = ctx, host_javabase = host_javabase, executable = busybox, + tools = [busybox], arguments = [args], inputs = depset([r_txt, manifest], transitive = transitive_r_txts + transitive_manifests), outputs = [out_class_jar], mnemonic = "StarlarkRClassGenerator", progress_message = "Generating R classes", + supports_workers = True, + supports_multiplex_workers = True, ) def _make_aar( @@ -995,6 +1049,8 @@ def _make_aar( when a resource conflict occurs. """ args = ctx.actions.args() + args.use_param_file("@%s", use_always=True) + args.set_param_file_format("multiline") args.add("--tool", "GENERATE_AAR") args.add("--") args.add( @@ -1014,10 +1070,13 @@ def _make_aar( if should_throw_on_conflict: args.add("--throwOnResourceConflict") + _disable_warnings(args) + _java.run( ctx = ctx, host_javabase = host_javabase, executable = busybox, + tools = [busybox], arguments = [args], inputs = ( resource_files + @@ -1028,6 +1087,8 @@ def _make_aar( outputs = [out_aar], mnemonic = "StarlarkAARGenerator", progress_message = "Generating AAR package for %s" % ctx.label, + supports_workers = True, + supports_multiplex_workers = True, ) busybox = struct( diff --git a/rules/java.bzl b/rules/java.bzl index 2e2fc5856..a0698650f 100644 --- a/rules/java.bzl +++ b/rules/java.bzl @@ -431,7 +431,17 @@ def _run( args["arguments"] = jvm_flags + [jar_args] + args.get("arguments", default = []) - ctx.actions.run(**args) + mnemonic = args.get("mnemonic") + supports_workers = args.pop("supports_workers", False) + supports_multiplex_workers = args.pop("supports_multiplex_workers", False) + execution_requirements = args.pop("execution_requirements", dict()) + if supports_workers: + execution_requirements["worker-key-mnemonic"] = mnemonic + execution_requirements["supports-workers"] = "1" + if supports_multiplex_workers: + execution_requirements["supports-multiplex-workers"] = "1" + + ctx.actions.run(execution_requirements = execution_requirements, **args) java = struct( compile = _compile, From 981477e49ab85655107ba49457820c83fb8013b8 Mon Sep 17 00:00:00 2001 From: Mauricio Galindo Date: Mon, 24 Apr 2023 14:13:01 -0700 Subject: [PATCH 2/7] Add flag to enable resource processr worker mode --- rules/busybox.bzl | 27 +++++++++++++++++---------- rules/flags/flag_defs.bzl | 4 ++++ 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/rules/busybox.bzl b/rules/busybox.bzl index 9b44a2583..2d0482016 100644 --- a/rules/busybox.bzl +++ b/rules/busybox.bzl @@ -15,6 +15,7 @@ """Bazel ResourcesBusyBox Commands.""" load(":java.bzl", _java = "java") +load("//rules/flags:flags.bzl", _flags = "flags") _ANDROID_RESOURCES_STRICT_DEPS = "android_resources_strict_deps" @@ -395,7 +396,7 @@ def _package( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -442,7 +443,7 @@ def _parse( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -527,7 +528,7 @@ def _merge_assets( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -610,7 +611,7 @@ def _validate_and_link( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -669,7 +670,7 @@ def _compile( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -775,7 +776,7 @@ def _merge_compiled( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -790,6 +791,12 @@ def _merge_compiled( supports_multiplex_workers = True, ) +def _java_run(ctx, *args, **kwargs): + enable_workers = _flags.get(ctx).persistent_android_resource_processor + kwargs["supports_workers"] = enable_workers + kwargs["supports_multiplex_workers"] = enable_workers + _java.run(*args, **kwargs) + def _escape_mv(s): """Escapes `:` and `,` in manifest values so they can be used as a busybox flag.""" return s.replace(":", "\\:").replace(",", "\\,") @@ -873,7 +880,7 @@ def _merge_manifests( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -930,7 +937,7 @@ def _process_databinding( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -1003,7 +1010,7 @@ def _generate_binary_r( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, @@ -1072,7 +1079,7 @@ def _make_aar( _disable_warnings(args) - _java.run( + _java_run( ctx = ctx, host_javabase = host_javabase, executable = busybox, diff --git a/rules/flags/flag_defs.bzl b/rules/flags/flag_defs.bzl index 61f2cf7f0..625b51e64 100644 --- a/rules/flags/flag_defs.bzl +++ b/rules/flags/flag_defs.bzl @@ -97,3 +97,7 @@ def define_flags(): default = True, description = "Use Studio Deployer to install apks", ) + flags.DEFINE_bool( + name = "persistent_android_resource_processor", + default = False, + description = "Enables worker mode for Android resource busybox actions.", From e24369343387dff10ead92a4f8e806ffe0b5cd93 Mon Sep 17 00:00:00 2001 From: Mauricio Galindo Date: Mon, 24 Apr 2023 14:17:03 -0700 Subject: [PATCH 3/7] only disable warning of worker mode is enabled --- rules/busybox.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rules/busybox.bzl b/rules/busybox.bzl index 2d0482016..e9c365296 100644 --- a/rules/busybox.bzl +++ b/rules/busybox.bzl @@ -120,8 +120,9 @@ def _make_resources_flag( ) def _disable_warnings(args): - # Disable warnings - this are output to stdin/stderr which breaks worker mode - args.add("--logWarnings=false") + if _flags.get(ctx).persistent_android_resource_processor: + # Disable warnings - this are output to stdin/stderr which breaks worker mode + args.add("--logWarnings=false") def _path(f): return f.path From 6f9998f639fd7075a0183315d7d43ec3a1825409 Mon Sep 17 00:00:00 2001 From: Mauricio Galindo Date: Mon, 24 Apr 2023 14:56:06 -0700 Subject: [PATCH 4/7] Fix issues --- rules/android_binary_internal/attrs.bzl | 3 +++ rules/busybox.bzl | 24 ++++++++++++------------ rules/flags/flag_defs.bzl | 1 + 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/rules/android_binary_internal/attrs.bzl b/rules/android_binary_internal/attrs.bzl index 2cc6a3dac..5b93fed50 100644 --- a/rules/android_binary_internal/attrs.bzl +++ b/rules/android_binary_internal/attrs.bzl @@ -74,6 +74,9 @@ ATTRS = _attrs.replace( cfg = "exec", default = Label("@@bazel_tools//tools/cpp:grep-includes"), ), + _flags = attr.label( + default = "//rules/flags", + ), ), _attrs.COMPILATION, _attrs.DATA_CONTEXT, diff --git a/rules/busybox.bzl b/rules/busybox.bzl index e9c365296..8a4552d00 100644 --- a/rules/busybox.bzl +++ b/rules/busybox.bzl @@ -119,7 +119,7 @@ def _make_resources_flag( ], ) -def _disable_warnings(args): +def _disable_warnings(ctx, args): if _flags.get(ctx).persistent_android_resource_processor: # Disable warnings - this are output to stdin/stderr which breaks worker mode args.add("--logWarnings=false") @@ -395,7 +395,7 @@ def _package( if java_package: args.add("--packageForR", java_package) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -442,7 +442,7 @@ def _parse( ) args.add("--output", out_symbols) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -527,7 +527,7 @@ def _merge_assets( join_with = "&", ) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -610,7 +610,7 @@ def _validate_and_link( args.add("--staticLibraryOut", out_file) output_files.append(out_file) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -669,7 +669,7 @@ def _compile( ) args.add("--output", out_file) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -775,7 +775,7 @@ def _merge_compiled( ) transitive_input_files.append(transitive_compiled_resources) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -796,7 +796,7 @@ def _java_run(ctx, *args, **kwargs): enable_workers = _flags.get(ctx).persistent_android_resource_processor kwargs["supports_workers"] = enable_workers kwargs["supports_multiplex_workers"] = enable_workers - _java.run(*args, **kwargs) + _java.run(ctx, *args, **kwargs) def _escape_mv(s): """Escapes `:` and `,` in manifest values so they can be used as a busybox flag.""" @@ -879,7 +879,7 @@ def _merge_manifests( args.add("--log", out_log_file) outputs.append(out_log_file) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -936,7 +936,7 @@ def _process_databinding( args.add("--dataBindingInfoOut", out_databinding_info) args.add("--appId", java_package) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -1009,7 +1009,7 @@ def _generate_binary_r( args.add("--classJarOutput", out_class_jar) args.add("--targetLabel", str(ctx.label)) - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, @@ -1078,7 +1078,7 @@ def _make_aar( if should_throw_on_conflict: args.add("--throwOnResourceConflict") - _disable_warnings(args) + _disable_warnings(ctx, args) _java_run( ctx = ctx, diff --git a/rules/flags/flag_defs.bzl b/rules/flags/flag_defs.bzl index 625b51e64..4d6227c97 100644 --- a/rules/flags/flag_defs.bzl +++ b/rules/flags/flag_defs.bzl @@ -101,3 +101,4 @@ def define_flags(): name = "persistent_android_resource_processor", default = False, description = "Enables worker mode for Android resource busybox actions.", + ) From 55662a8bf965518b3b94ef1cb547d2dd1547fd48 Mon Sep 17 00:00:00 2001 From: Mauricio Galindo Date: Mon, 24 Apr 2023 15:05:14 -0700 Subject: [PATCH 5/7] Add flag for multiplex workers --- rules/busybox.bzl | 8 +++++--- rules/flags/flag_defs.bzl | 8 ++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/rules/busybox.bzl b/rules/busybox.bzl index 8a4552d00..c41cef9d5 100644 --- a/rules/busybox.bzl +++ b/rules/busybox.bzl @@ -120,7 +120,8 @@ def _make_resources_flag( ) def _disable_warnings(ctx, args): - if _flags.get(ctx).persistent_android_resource_processor: + if (_flags.get(ctx).persistent_android_resource_processor or + _flags.get(ctx).persistent_multiplex_android_resource_processor): # Disable warnings - this are output to stdin/stderr which breaks worker mode args.add("--logWarnings=false") @@ -794,8 +795,9 @@ def _merge_compiled( def _java_run(ctx, *args, **kwargs): enable_workers = _flags.get(ctx).persistent_android_resource_processor - kwargs["supports_workers"] = enable_workers - kwargs["supports_multiplex_workers"] = enable_workers + multiplex_workers = _flags.get(ctx).persistent_multiplex_android_resource_processor + kwargs["supports_workers"] = enable_workers or multiplex_workers + kwargs["supports_multiplex_workers"] = multiplex_workers _java.run(ctx, *args, **kwargs) def _escape_mv(s): diff --git a/rules/flags/flag_defs.bzl b/rules/flags/flag_defs.bzl index 4d6227c97..fa9513855 100644 --- a/rules/flags/flag_defs.bzl +++ b/rules/flags/flag_defs.bzl @@ -102,3 +102,11 @@ def define_flags(): default = False, description = "Enables worker mode for Android resource busybox actions.", ) + flags.DEFINE_bool( + name = "persistent_multiplex_android_resource_processor", + default = False, + description = ( + "Enables multiplex worker mode for Android resource busybox actions. " + + "This flag implictly enables persistent_android_resource_processor." + ), + ) From 69a010c9dc60af9ee86728b53e09af54f5ed6485 Mon Sep 17 00:00:00 2001 From: Mauricio Galindo Date: Tue, 23 May 2023 13:17:04 -0700 Subject: [PATCH 6/7] Use persistent android workers from fragment config --- rules/android_binary_internal/attrs.bzl | 3 --- rules/busybox.bzl | 11 +++++------ rules/flags/flag_defs.bzl | 13 ------------- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/rules/android_binary_internal/attrs.bzl b/rules/android_binary_internal/attrs.bzl index ccac157f3..5a6f807eb 100644 --- a/rules/android_binary_internal/attrs.bzl +++ b/rules/android_binary_internal/attrs.bzl @@ -98,9 +98,6 @@ ATTRS = _attrs.replace( cfg = "exec", default = Label("@@bazel_tools//tools/cpp:grep-includes"), ), - _flags = attr.label( - default = "//rules/flags", - ), ), _attrs.COMPILATION, _attrs.DATA_CONTEXT, diff --git a/rules/busybox.bzl b/rules/busybox.bzl index 8a5db587a..21716ac95 100644 --- a/rules/busybox.bzl +++ b/rules/busybox.bzl @@ -15,7 +15,6 @@ """Bazel ResourcesBusyBox Commands.""" load(":java.bzl", _java = "java") -load("//rules/flags:flags.bzl", _flags = "flags") _ANDROID_RESOURCES_STRICT_DEPS = "android_resources_strict_deps" @@ -120,8 +119,8 @@ def _make_resources_flag( ) def _disable_warnings(ctx, args): - if (_flags.get(ctx).persistent_android_resource_processor or - _flags.get(ctx).persistent_multiplex_android_resource_processor): + if (ctx.fragments.android.persistent_android_resource_processor or + ctx.fragments.android.persistent_multiplex_android_resource_processor): # Disable warnings - this are output to stdin/stderr which breaks worker mode args.add("--logWarnings=false") @@ -811,10 +810,10 @@ def _merge_compiled( ) def _java_run(ctx, *args, **kwargs): - enable_workers = _flags.get(ctx).persistent_android_resource_processor - multiplex_workers = _flags.get(ctx).persistent_multiplex_android_resource_processor + enable_workers = ctx.fragments.android.persistent_android_resource_processor + multiplex_workers = ctx.fragments.android.persistent_multiplex_android_resource_processor kwargs["supports_workers"] = enable_workers or multiplex_workers - kwargs["supports_multiplex_workers"] = multiplex_workers + kwargs["supports_multiplex_workers"] = multiplex_workers _java.run(ctx, *args, **kwargs) def _escape_mv(s): diff --git a/rules/flags/flag_defs.bzl b/rules/flags/flag_defs.bzl index fa9513855..61f2cf7f0 100644 --- a/rules/flags/flag_defs.bzl +++ b/rules/flags/flag_defs.bzl @@ -97,16 +97,3 @@ def define_flags(): default = True, description = "Use Studio Deployer to install apks", ) - flags.DEFINE_bool( - name = "persistent_android_resource_processor", - default = False, - description = "Enables worker mode for Android resource busybox actions.", - ) - flags.DEFINE_bool( - name = "persistent_multiplex_android_resource_processor", - default = False, - description = ( - "Enables multiplex worker mode for Android resource busybox actions. " + - "This flag implictly enables persistent_android_resource_processor." - ), - ) From 761207e7f8798ed336e8c0423538f4896047090d Mon Sep 17 00:00:00 2001 From: Mauricio Galindo Date: Tue, 23 May 2023 13:22:21 -0700 Subject: [PATCH 7/7] Remove unused args --- rules/busybox.bzl | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/rules/busybox.bzl b/rules/busybox.bzl index 21716ac95..59a5b789f 100644 --- a/rules/busybox.bzl +++ b/rules/busybox.bzl @@ -416,8 +416,6 @@ def _package( outputs = output_files, mnemonic = "PackageAndroidResources", progress_message = "Packaging Android Resources in %s" % ctx.label, - supports_workers = True, - supports_multiplex_workers = True, ) def _parse( @@ -462,8 +460,6 @@ def _parse( outputs = [out_symbols], mnemonic = "ParseAndroidResources", progress_message = "Parsing Android Resources in %s" % out_symbols.short_path, - supports_workers = True, - supports_multiplex_workers = True, ) def _make_merge_assets_flags(resources_node): @@ -552,8 +548,6 @@ def _merge_assets( mnemonic = "MergeAndroidAssets", progress_message = "Merging Android Assets in %s" % out_assets_zip.short_path, - supports_workers = True, - supports_multiplex_workers = True, ) def _validate_and_link( @@ -640,8 +634,6 @@ def _validate_and_link( mnemonic = "LinkAndroidResources", progress_message = "Linking Android Resources in " + out_file.short_path, - supports_workers = True, - supports_multiplex_workers = True, ) def _compile( @@ -698,8 +690,6 @@ def _compile( outputs = [out_file], mnemonic = "CompileAndroidResources", progress_message = "Compiling Android Resources in %s" % out_file.short_path, - supports_workers = True, - supports_multiplex_workers = True, ) def _make_merge_compiled_flags(resources_node_info): @@ -805,8 +795,6 @@ def _merge_compiled( mnemonic = "StarlarkMergeCompiledAndroidResources", progress_message = "Merging compiled Android Resources in " + out_class_jar.short_path, - supports_workers = True, - supports_multiplex_workers = True, ) def _java_run(ctx, *args, **kwargs): @@ -909,8 +897,6 @@ def _merge_manifests( outputs = outputs, mnemonic = "MergeManifests", progress_message = "Merging Android Manifests in %s" % out_file.short_path, - supports_workers = True, - supports_multiplex_workers = True, ) def _process_databinding( @@ -965,8 +951,6 @@ def _process_databinding( outputs = [out_databinding_info] + out_databinding_processed_resources, mnemonic = "StarlarkProcessDatabinding", progress_message = "Processing data binding", - supports_workers = True, - supports_multiplex_workers = True, ) def _make_generate_binay_r_flags(resources_node): @@ -1039,8 +1023,6 @@ def _generate_binary_r( outputs = [out_class_jar], mnemonic = "StarlarkRClassGenerator", progress_message = "Generating R classes", - supports_workers = True, - supports_multiplex_workers = True, ) def _make_aar( @@ -1113,8 +1095,6 @@ def _make_aar( outputs = [out_aar], mnemonic = "StarlarkAARGenerator", progress_message = "Generating AAR package for %s" % ctx.label, - supports_workers = True, - supports_multiplex_workers = True, ) busybox = struct(