Make GetDirectDep implementation match comment
The comment on the interface of GetDirectDep states if there are
multiple deps with different tags, the first will be returned; however,
the current behavior is to panic if there are multiple deps. The
behavior now:
* a single dep, return the module and tag
* a single module with different tags: return module with first tag
* multiple modules: panic
* no module: return nil, nil
Bug: 186488405
Test: ~/aosp/build/bazel/ci/bp2build.sh
Test: m nothing
Change-Id: Id1e7315e7874b4a683ad7357ed2793822315821f
diff --git a/android/bazel.go b/android/bazel.go
index 49fc0ad..76201de 100644
--- a/android/bazel.go
+++ b/android/bazel.go
@@ -181,7 +181,8 @@
"libc_nopthread", // ruperts@, cc_library_static, depends on //external/arm-optimized-routine
// Things that transitively depend on //system/libbase. libbase doesn't work because:
- // "Multiple dependencies having same BaseModuleName() "fmtlib" found from "libbase""
+ // fmtlib: fatal error: 'cassert' file not found
+ // libbase: no such target '//build/bazel/platforms/os:darwin': target 'darwin' not declared
"libbionic_spawn_benchmark", // ruperts@, cc_library_static, depends on libbase, libgoogle-benchmark
"libc_malloc_debug", // ruperts@, cc_library_static, depends on libbase
"libc_malloc_debug_backtrace", // ruperts@, cc_library_static, depends on libbase