From 83c7ae4817c2bdb1980851d34ac0a8bd28a3ff7d Mon Sep 17 00:00:00 2001 From: Luis Padron Date: Wed, 19 Jun 2024 00:24:58 -0400 Subject: [PATCH] Use `swiftc_inputs` instead of `deps` for Swift VFS target This fixes a missing `_swift_vfs.yaml` error related to the changes in: https://github.com/bazelbuild/rules_swift/pull/1191 --- rules/library.bzl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rules/library.bzl b/rules/library.bzl index d416fcbb..6201ec63 100644 --- a/rules/library.bzl +++ b/rules/library.bzl @@ -961,6 +961,7 @@ def apple_library( tags = _MANUAL, ) module_map = "%s.extended.modulemap" % name + swiftc_inputs.append(module_map) # Note: this needs to go here, in order to virtualize the extended module framework_vfs_overlay( @@ -991,11 +992,11 @@ def apple_library( "@build_bazel_rules_ios//:virtualize_frameworks": framework_vfs_swift_copts, "//conditions:default": framework_vfs_swift_copts if enable_framework_vfs else [], }) + additional_swift_copts, - deps = deps + private_deps + private_dep_names + lib_names + select({ + deps = deps + private_deps + private_dep_names + lib_names, + swiftc_inputs = swiftc_inputs + select({ "@build_bazel_rules_ios//:virtualize_frameworks": [framework_vfs_overlay_name_swift], "//conditions:default": [framework_vfs_overlay_name_swift] if enable_framework_vfs else [], }), - swiftc_inputs = swiftc_inputs, features = features + ["swift.no_generated_module_map", "swift.use_pch_output_dir"] + select({ "@build_bazel_rules_ios//:virtualize_frameworks": ["swift.vfsoverlay"], "//conditions:default": [],