2.2.0
What's Changed
- Adding target name to output path for plugin executable by @tymurmustafaiev in #1294
- Simplify
swift_library_group
by @brentleyjones in #1292 - Fix coverage executable substitution in template by @sebastianv1 in #1297
- Remove arm simulator minimum version adjustment by @brentleyjones in #1298
- Un-conditionalize logic for features that require Xcode 15.0 or higher (dropping support for Xcode 14) by @luispadron in #1311
- Add toolchains by @brentleyjones in #1321
- Allow the Swift toolchain to be associated with an execution group and pass an optional execution group name down to actions that use it by @brentleyjones in #1318
- Add
mixed_langauge_library
by @brentleyjones in #1293 - Fix non-Apple toolchains by @brentleyjones in #1323
- Switch the Swift rules over to toolchains by @brentleyjones in #1319
- Support
swift_{binary,test}
generating a.dSYM
bundle as an output when--apple_generate_dsym
is set by @brentleyjones in #1327 - Add the
swift_module_mapping
rule by @brentleyjones in #1329 - Add -file-prefix-map support by @brentleyjones in #1326
- Add the
module_mapping
flag to the Swift rules by @brentleyjones in #1332 - Add new swift.modular_indexing feature to index explicit PCMs by @brentleyjones in #1331
- Don't use an absolute path for index unit names by @brentleyjones in #1334
- Add visibility to Starlark flags by @brentleyjones in #1338
- Add a Boolean
library_evolution
attribute toswift_library
by @brentleyjones in #1335 - Add copts parameter to compile_module_interface() by @brentleyjones in #1336
- Implement compilation support for
swift_module_mapping
by @brentleyjones in #1333 swift_import
: always link the import. by @brentleyjones in #1343- Add the
swift_module_mapping_test
rule by @brentleyjones in #1340 - Remove checks for Xcode versions prior to 14.0 and unconditionally enable features that require 14.0 or greater by @brentleyjones in #1353
- Only pass test runner deps to
swift_test
test runner compile by @brentleyjones in #1354 - Remove
force_apple_target
Starlark flag by @brentleyjones in #1350 - Add
swift.checked_exclusivity
feature by @brentleyjones in #1352 - Extract
derive_swift_module_name
as a free function in its own.bzl
file by @brentleyjones in #1347 - Remove the
swift_explicit_module
output group fromswift_clang_module_aspect
by @brentleyjones in #1349 - Allow configuring clang module dependencies for precompiled c modules by @brentleyjones in #1351
- Support
--test_filter
inswift_test
by @brentleyjones in #1341 - Support for alwayslink outputs. by @brentleyjones in #1356
- Disable AEGs inside xcode_swift_toolchain by @brentleyjones in #1359
- Define the
swift_cross_import_overlay
rule by @brentleyjones in #1342 - Disable AEGs inside swift_library by @brentleyjones in #1361
- Disable AEGs inside rules which uses swift toolchain from a rule's attribute by @brentleyjones in #1360
- Pass
language = "objc"
tocc_common.configure_features
when targeting an Apple platform by @brentleyjones in #1358 - Capture macro expansions in an output group named
macro_expansions
during debug builds by @brentleyjones in #1355 - Extract
create_swift_module_context
andcreate_{clang,swift}_module_inputs
as free functions in the lightweightproviders.bzl
file, and turncreate_swift_info
into the initializer callback forSwiftInfo
by @brentleyjones in #1357 - Add cross-import overlay
SwiftInfo
s to compilation prerequisites when needed by @brentleyjones in #1362 - Extract
create_swift_interop_info
as a free function in the lightweightswift_interop_info.bzl
file by @brentleyjones in #1366 - Compile a .swiftinterface file into a .swiftmodule if present in apple_sdk_module rule by @brentleyjones in #1368
- Simplify
swift_common.compile
so that it returns aSwiftInfo
that can be propagated by callers by @brentleyjones in #1370 - Enable
swift.checked_exclusivity
by default by @brentleyjones in #1371 - Add a feature that enables
-index-include-locals
for Swift compiles by @brentleyjones in #1375 - Align with upstream
const_gather_protocols
change by @brentleyjones in #1376 - Provide a way for aspects to participate in
swift_feature_allowlist
checking by @brentleyjones in #1377 - Use
ConfigResultInfo
to set additional tools by @brentleyjones in #1378 - Add
swift.disable_clang_spi
feature and enable it by default by @brentleyjones in #1372 - Remove duplicate
-enable-library-evolution
flag by @brentleyjones in #1382 - Create an empty marker provider
SwiftClangModuleAspectInfo
by @brentleyjones in #1379 - Make sure
swift_import
propagates the.swiftinterface
file in itsSwiftInfo
if it's given one as an input by @brentleyjones in #1380 - Add an
is_framework
parameter tocompile_module_interface
by @brentleyjones in #1374 - Align
swift.supports_bare_slash_regex
code with upstream by @brentleyjones in #1384 - Write "isSystem" and "isFramework" in explicit swift module map by @brentleyjones in #1387
- Add
swift.internalize_at_link
feature and enable it by default by @brentleyjones in #1389 - Extract
command_line_objc_copts
tocompile_config.bzl
by @brentleyjones in #1391 - Allow rules/aspects to optionally depend on the Swift toolchain by @brentleyjones in #1392
- Write entries for clang modules in explicit swift module map by @brentleyjones in #1394
- Consolidate default features logic by @brentleyjones in #1397
- Align macro support with upstream by @brentleyjones in #1395
- Allow testing of
swift_binary
targets by @brentleyjones in #1400 - Add
swift.disable_availability_checking
feature by @brentleyjones in #1401 - Move declaration of
.swiftsourceinfo
files behind a feature since they are non-deterministic (contain absolute paths) by @brentleyjones in #1403 - Bless
SwiftBinaryInfo
as a public provider for IDEs and language tooling that need to get at the Swift module of aswift_binary
orswift_test
target by @brentleyjones in #1404 - Remove j2objc related code by @brentleyjones in #1406
- Add the ability to enable upcoming and experimental Swift features via Bazel features by @brentleyjones in #1405
- Add the
swift.enable_v6
feature to support migration to the Swift 6 language mode by @brentleyjones in #1411 - Define
swift_compiler_plugin_import
to support pre-built compiler plugins, and add aplugins
attribute toswift_import
by @brentleyjones in #1412 - Enable
AccessLevelOnImport
by default by @brentleyjones in #1413
Full Changelog: 2.1.1...2.2.0
This release is compatible with Bazel 6.x LTS, 7.x LTS, and 8.x rolling releases.
MODULE.bazel Snippet
bazel_dep(name = "rules_swift", version = "2.2.0", repo_name = "build_bazel_rules_swift")
Workspace Snippet
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "build_bazel_rules_swift",
sha256 = "3f91a879beff14b64d07105771dc0db87c2b98b128a4957bfbe54c27fb47da38",
url = "https://github.com/bazelbuild/rules_swift/releases/download/2.2.0/rules_swift.2.2.0.tar.gz",
)
load(
"@build_bazel_rules_swift//swift:repositories.bzl",
"swift_rules_dependencies",
)
swift_rules_dependencies()
load(
"@build_bazel_rules_swift//swift:extras.bzl",
"swift_rules_extra_dependencies",
)
swift_rules_extra_dependencies()