diff --git a/swiftpkg/internal/pkginfo_target_deps.bzl b/swiftpkg/internal/pkginfo_target_deps.bzl index 82eaa7b80..347723c14 100644 --- a/swiftpkg/internal/pkginfo_target_deps.bzl +++ b/swiftpkg/internal/pkginfo_target_deps.bzl @@ -81,7 +81,7 @@ def _resolve_by_name(pkg_ctx, name): ext_dep = lists.find( pkg_ctx.pkg_info.dependencies, - lambda d: d.identity == normalized_name, + lambda d: d.name == normalized_name, ) if ext_dep != None: return [bazel_labels.new( diff --git a/swiftpkg/tests/pkginfo_target_deps_tests.bzl b/swiftpkg/tests/pkginfo_target_deps_tests.bzl index 50c499c17..0082eb43a 100644 --- a/swiftpkg/tests/pkginfo_target_deps_tests.bzl +++ b/swiftpkg/tests/pkginfo_target_deps_tests.bzl @@ -25,7 +25,7 @@ _target_dep_condition = pkginfos.new_target_dependency_condition( # AwesomePackage (external dependency) _external_dep = pkginfos.new_dependency( - identity = "awesomepackage", + identity = "awesomepackage-identity", name = "AwesomePackage", file_system = pkginfos.new_file_system( path = "/path/to/AwesomePackage", @@ -134,7 +134,7 @@ def _bzl_select_list_test(ctx): kind = pkginfo_target_deps.target_dep_kind, value = [ bazel_labels.normalize( - "@swiftpkg_awesomepackage//:AwesomePackage", + "@swiftpkg_awesomepackage_identity//:AwesomePackage", ), ], ), @@ -148,7 +148,7 @@ def _bzl_select_list_test(ctx): kind = pkginfo_target_deps.target_dep_kind, value = [ bazel_labels.normalize( - "@swiftpkg_awesomepackage//:AwesomeProduct", + "@swiftpkg_awesomepackage_identity//:AwesomeProduct", ), ], ), @@ -162,7 +162,7 @@ def _bzl_select_list_test(ctx): kind = pkginfo_target_deps.target_dep_kind, value = [ bazel_labels.normalize( - "@swiftpkg_awesomepackage//:AwesomeProduct", + "@swiftpkg_awesomepackage_identity//:AwesomeProduct", ), ], condition = c,