From e8431a1f4f309e2271e8a0f1f5cd57e4c881893b Mon Sep 17 00:00:00 2001 From: Jon Parise Date: Mon, 27 Sep 2021 15:37:08 -0700 Subject: [PATCH] Migrate off of SwiftInfo.module_name Use the name of the first direct module instead. --- src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl b/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl index 5c21a550..cf089a44 100644 --- a/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl +++ b/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl @@ -938,7 +938,9 @@ def _tulsi_sources_aspect(target, ctx): test_deps = None if SwiftInfo in target: - module_name = target[SwiftInfo].module_name + swift_info = target[SwiftInfo] + if swift_info.direct_modules: + module_name = swift_info.direct_modules[0].name else: module_name = None