From bd59a5ffbd8f2067b881f79b60530963fe756aaa Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Thu, 16 Jul 2026 14:17:03 -0700 Subject: [PATCH 1/7] Apply cf_build_test to cvd/fetch Bug: b/532697459 --- base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel index 1fef0f6fc3d..41853dbc132 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel @@ -1,12 +1,14 @@ load("@protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") load("@protobuf//bazel:proto_library.bzl", "proto_library") load("//:build_variables.bzl", "COPTS") -load("//cuttlefish/bazel:rules.bzl", "cf_cc_library", "cf_cc_test") +load("//cuttlefish/bazel:rules.bzl", "cf_build_test", "cf_cc_library", "cf_cc_test") package( default_visibility = ["//:android_cuttlefish"], ) +cf_build_test(name = "fetch_build_test") + cf_cc_library( name = "auto_login", srcs = [ From d179865f2222d31504d44d3fe34a3acb75c8fbdc Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Thu, 16 Jul 2026 14:19:22 -0700 Subject: [PATCH 2/7] Fix dependency issues with fetch:build_api_credentials Bug: b/534499070 --- base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel | 4 +--- .../host/commands/cvd/fetch/build_api_credentials.cc | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel index 41853dbc132..a50918c7955 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel @@ -37,17 +37,15 @@ cf_cc_library( hdrs = [ "build_api_credentials.h", ], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:environment", "//cuttlefish/common/libs/utils:files", - "//cuttlefish/common/libs/utils:json", "//cuttlefish/host/commands/cvd/fetch:build_api_flags", - "//cuttlefish/host/commands/cvd/fetch:credential_flags", "//cuttlefish/host/libs/web:credential_source", "//cuttlefish/host/libs/web/http_client", "//cuttlefish/result", "@abseil-cpp//absl/log", + "@jsoncpp", ], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_credentials.cc b/base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_credentials.cc index 48a174b2f54..14863716002 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_credentials.cc +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_credentials.cc @@ -20,10 +20,11 @@ #include #include "absl/log/log.h" +#include "json/reader.h" +#include "json/value.h" #include "cuttlefish/common/libs/utils/environment.h" #include "cuttlefish/common/libs/utils/files.h" -#include "cuttlefish/common/libs/utils/json.h" #include "cuttlefish/host/commands/cvd/fetch/build_api_flags.h" #include "cuttlefish/host/libs/web/credential_source.h" #include "cuttlefish/host/libs/web/http_client/http_client.h" From b764665455966ac3ff3b275069b7b04d1b7e2df1 Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Thu, 16 Jul 2026 14:21:54 -0700 Subject: [PATCH 3/7] Fix dependency issues with fetch:build_api_flags Bug: b/534499070 --- base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel | 2 -- base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_flags.cc | 1 - 2 files changed, 3 deletions(-) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel index a50918c7955..df81d69bda0 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel @@ -53,7 +53,6 @@ cf_cc_library( name = "build_api_flags", srcs = ["build_api_flags.cc"], hdrs = ["build_api_flags.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/flag_parser", "//cuttlefish/host/commands/cvd/cache", @@ -61,7 +60,6 @@ cf_cc_library( "//cuttlefish/host/libs/web:android_build_url", "//cuttlefish/host/libs/web/cas:cas_flags", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/strings", ], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_flags.cc b/base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_flags.cc index 07efbaadc3d..990a823ef6f 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_flags.cc +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/build_api_flags.cc @@ -16,7 +16,6 @@ #include "cuttlefish/host/commands/cvd/fetch/build_api_flags.h" #include -#include #include #include From cf728db012ecdb6fdb7cbfdaca226059878bfe6a Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Thu, 16 Jul 2026 14:25:03 -0700 Subject: [PATCH 4/7] Fix dependency issues with fetch:downloaders Bug: b/534499070 --- base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel | 3 --- base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.cc | 1 - base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.h | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel index df81d69bda0..e0a496a7d04 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel @@ -123,14 +123,11 @@ cf_cc_library( name = "downloaders", srcs = ["downloaders.cc"], hdrs = ["downloaders.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:environment", "//cuttlefish/host/commands/cvd/fetch:build_api_credentials", "//cuttlefish/host/commands/cvd/fetch:build_api_flags", - "//cuttlefish/host/commands/cvd/fetch:fetch_cvd_parser", "//cuttlefish/host/libs/web:android_build_api", - "//cuttlefish/host/libs/web:android_build_api_key", "//cuttlefish/host/libs/web:android_build_url", "//cuttlefish/host/libs/web:build_api", "//cuttlefish/host/libs/web:caching_build_api", diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.cc b/base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.cc index bd1b78e2bfe..3612705c065 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.cc +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.cc @@ -23,7 +23,6 @@ #include "cuttlefish/common/libs/utils/environment.h" #include "cuttlefish/host/commands/cvd/fetch/build_api_credentials.h" #include "cuttlefish/host/commands/cvd/fetch/build_api_flags.h" -#include "cuttlefish/host/commands/cvd/fetch/fetch_cvd_parser.h" #include "cuttlefish/host/libs/web/android_build_api.h" #include "cuttlefish/host/libs/web/android_build_url.h" #include "cuttlefish/host/libs/web/build_api.h" diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.h b/base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.h index 83df7bfad2c..2d34c98d68f 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.h +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/downloaders.h @@ -18,7 +18,7 @@ #include #include -#include "cuttlefish/host/commands/cvd/fetch/fetch_cvd_parser.h" +#include "cuttlefish/host/commands/cvd/fetch/build_api_flags.h" #include "cuttlefish/host/libs/web/build_api.h" #include "cuttlefish/host/libs/web/luci_build_api.h" #include "cuttlefish/result/result.h" From fa59196b0eb73791700fa9f28cc4f373d3bbf2c9 Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Thu, 16 Jul 2026 14:26:58 -0700 Subject: [PATCH 5/7] Fix build issues with fetch:fetch_context Bug: b/534499070 --- base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel | 3 --- 1 file changed, 3 deletions(-) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel index e0a496a7d04..b4b90fbc9b2 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel @@ -170,9 +170,7 @@ cf_cc_library( name = "fetch_context", srcs = ["fetch_context.cc"], hdrs = ["fetch_context.h"], - depend_on_what_you_use_enabled = False, deps = [ - "//cuttlefish/common/libs/utils:archive", "//cuttlefish/common/libs/utils:files", "//cuttlefish/host/commands/cvd/fetch:builds", "//cuttlefish/host/commands/cvd/fetch:de_android_sparse", @@ -186,7 +184,6 @@ cf_cc_library( "//cuttlefish/host/libs/web:build_api_zip", "//cuttlefish/host/libs/zip:zip_file", "//cuttlefish/host/libs/zip/libzip_cc:archive", - "//cuttlefish/posix:strerror", "//cuttlefish/result", "//libbase", "@abseil-cpp//absl/strings", From df6312c5469f7a9f4a2eb9e30f281281d555a97c Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Thu, 16 Jul 2026 14:28:44 -0700 Subject: [PATCH 6/7] Fix dependency issues with fetch:fetch_cvd Bug: b/534499070 --- base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel | 3 --- 1 file changed, 3 deletions(-) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel index b4b90fbc9b2..caf626aadd0 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel @@ -196,7 +196,6 @@ cf_cc_library( srcs = ["fetch_cvd.cc"], hdrs = ["fetch_cvd.h"], copts = COPTS + ["-Werror=sign-compare"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:archive", "//cuttlefish/common/libs/utils:contains", @@ -210,7 +209,6 @@ cf_cc_library( "//cuttlefish/host/commands/cvd/fetch:fetch_tracer", "//cuttlefish/host/commands/cvd/fetch:host_package", "//cuttlefish/host/commands/cvd/fetch:host_tools_target", - "//cuttlefish/host/commands/cvd/fetch:substitute", "//cuttlefish/host/commands/cvd/fetch:target_directories", "//cuttlefish/host/commands/cvd/utils:common", "//cuttlefish/host/libs/config:fetcher_config", @@ -221,7 +219,6 @@ cf_cc_library( "//cuttlefish/host/libs/web:chrome_os_build_string", "//cuttlefish/host/libs/web:luci_build_api", "//cuttlefish/host/libs/web/http_client:curl_global_init", - "//cuttlefish/host/libs/zip:zip_string", "//cuttlefish/host/libs/zip/libzip_cc:archive", "//cuttlefish/io", "//cuttlefish/io:string", From caf3ccd5a456421c3bdada0d3e02a9b9264ac7bf Mon Sep 17 00:00:00 2001 From: "A. Cody Schuffelen" Date: Thu, 16 Jul 2026 14:30:54 -0700 Subject: [PATCH 7/7] Fix dependency issues in fetch:fetch_cvd_parser Bug: b/534499070 --- base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel | 3 --- .../cvd/cuttlefish/host/commands/cvd/fetch/fetch_cvd_parser.cc | 1 - 2 files changed, 4 deletions(-) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel index caf626aadd0..d3f256b63f3 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/BUILD.bazel @@ -232,15 +232,12 @@ cf_cc_library( name = "fetch_cvd_parser", srcs = ["fetch_cvd_parser.cc"], hdrs = ["fetch_cvd_parser.h"], - depend_on_what_you_use_enabled = False, deps = [ "//cuttlefish/common/libs/utils:files", - "//cuttlefish/common/libs/utils:tee_logging", "//cuttlefish/flag_parser", "//cuttlefish/host/commands/cvd/fetch:build_api_flags", "//cuttlefish/host/commands/cvd/fetch:vector_flags", "//cuttlefish/result", - "//libbase", "@abseil-cpp//absl/log", ], ) diff --git a/base/cvd/cuttlefish/host/commands/cvd/fetch/fetch_cvd_parser.cc b/base/cvd/cuttlefish/host/commands/cvd/fetch/fetch_cvd_parser.cc index 19b9d7d3638..dcf153f34c6 100644 --- a/base/cvd/cuttlefish/host/commands/cvd/fetch/fetch_cvd_parser.cc +++ b/base/cvd/cuttlefish/host/commands/cvd/fetch/fetch_cvd_parser.cc @@ -15,7 +15,6 @@ #include "cuttlefish/host/commands/cvd/fetch/fetch_cvd_parser.h" -#include #include #include #include