Skip to content

Releases: bazelbuild/rules_swift

2.2.3

04 Nov 17:55
00a52db
Compare
Choose a tag to compare

What's Changed

  • Add data attribute to mixed_language_library (#1450)
  • Set alwayslink on the clang target of mixed_language_library as well (#1451)

Full Changelog: 2.2.2...2.2.3

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.3", 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 = "1dffffcbdc969c3d0865fcabace3ff576a81009e2add5688e740d8a9342efef5",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.2.3/rules_swift.2.2.3.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()

2.2.2

25 Oct 14:31
fd3c5ac
Compare
Choose a tag to compare

What's Changed

  • Remove unnecessary SwiftBinaryInfo required provider from plugins attribute (#1445)

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.2", 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 = "5563621eb523f35373eb06a744f00a4c1d631e9b9af256754cd3ff152f888940",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.2.2/rules_swift.2.2.2.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()

2.2.1

22 Oct 19:27
5bb185c
Compare
Choose a tag to compare

What's Changed

  • Fix build_file labels (#1426)
  • Allow existing SwiftInfo arguments until 3.0 (#1419)
  • Warn instead of fail when swiftc not found on Linux (#1433)

Full Changelog: 2.2.0...2.2.1

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.1", 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 = "fec71cca4c100e5d6ba9a700b17b3f3da94f43e693fa0e4e81ce7768ff66cd84",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.2.1/rules_swift.2.2.1.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()

2.2.0

21 Oct 21:23
bc865ad
Compare
Choose a tag to compare

What's Changed

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"...
Read more

2.1.1

10 Jul 13:35
f968179
Compare
Choose a tag to compare

What's Changed

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.1.1", 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 = "9919ed1d8dae509645bfd380537ae6501528d8de971caebed6d5185b9970dc4d",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.1.1/rules_swift.2.1.1.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()

2.1.0

09 Jul 18:03
a127f44
Compare
Choose a tag to compare

What's Changed

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.1.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 = "8e0c72aa2be5ae44da44521c46e0700df184953e8dbc5d5423222b8cb141c64f",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.1.0/rules_swift.2.1.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()

2.0.0

09 Jul 13:30
b65d9ad
Compare
Choose a tag to compare

What's Changed

Breaking Changes

  • The swift_module= tag on cc_library targets no longer does anything, and the swift_c_module rule was removed: #1191 and #1224
    • Use the new swift_interop_hint aspect hint instead
    • There were also some changes to how the apple_common.Objc provider is handled (e.g. d68b214)
  • The deprecated swift proto library rules were removed: #1193
  • The Bzlmod module.compatibility_level was increased: #1214
    • If you ruleset can support both pre-2.0 and post-2.0 rules_swift, please set bazel_dep.max_compatibility_level = 2 instead of bumping your minimum supported version of rules_swift
  • The swift.disable_system_index feature is now enabled by default: #1252
  • Removed swift.emit_symbol_graph feature: #1229
    • Use the new swift_symbol_graph_extract rule
  • Removed the swift.use_response_files feature: #1275
  • Removed the swift.bundled_xctests feature: #1272
  • Removed the implicit output from swift_library: #1260
  • Moved swift_usage_aspect and SwiftUsageInfo from rules_swift into rules_apple: #1223
  • Manually specifying the -index-store-path flag while also using the swift.index_while_building is no longer supported: #1248
  • It is now an error to specify both swiftinterface and swiftmodule in swift_import: #1253

Deprecations

  • Moved rules and other build definitions into their own public files and deprecated the umbrella swift.bzl and proto.bzl files: #1231, #1236, and #1255
    • Please update your load statements as the swift.bzl file will be removed in the next major release

Other changes

  • Added support for symbol graph extraction with the swift_symbol_graph_extract rule: #772, #1195, #1246, #1270, and #1271
  • Added support for the fdo_instrument_order_file feature: #1251
  • Added the swift.add_target_name_to_output feature, which allows multiple targets in a package to produce the same module name in the same build: #1098 and #1217
  • Added the swift.thin_lto and swift.full_lto features to enable LTO: #1208
  • Added the swift.propagate_generated_module_map feature to propagate the generated module map: #1212
  • Added the swift.headers_always_action_inputs feature which causes all headers to always be included as inputs to SwiftCompile actions, even when using explicit modules: #1249
  • Added an API to compile a .swiftinterface file into a .swiftmodule: #1250
  • Added an XCTest observer to swift_test targets that generates a JUnit-style XML log at the path in the XML_OUTPUT_PATH environment variable defined by Bazel: #1222, #1242, #1263, and #1273
  • Added a discover_tests attribute to swift_test: #1259, #1266, #1273, and #1274
  • Added a mechanism to provide a list of protocol names for constant value extraction: #1170
  • Added a swift_common.get_toolchain helper function: #1226, #1257, and #1258
  • resource_set is now defined for SwiftCompile actions: #1241
  • Swift compiler sandboxing is now disabled when using Xcode 15.3+, which fixes nested sandboxing errors: #1206
  • We now correctly add .swiftmodule directories to the search path: #1245
  • We now correctly calculate the minimum supported OS when calculating the target triple for 'arm64-apple-ios-simulator' targets: #1247
  • The new driver is now used on Xcode 14+ since it contains the fixes in swiftlang/swift-driver#1036: #1268
  • Removed some no-longer-relevant "supports X" features: #1267
  • Fixed LLDB expr evaluation for swift_{binary,test} targets only containing Swift in their srcs: #1269
  • Fixed usage of params files in _swift_proto_compile: #1283

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.0.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 = "32eeb4ef33c708d9c9a4ee0fa8475322ef149dabc81884ddc3b50eb2efff7843",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.0.0/rules_swift.2.0.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()

2.0.0-rc1

25 Jun 12:29
Compare
Choose a tag to compare
2.0.0-rc1 Pre-release
Pre-release

What's Changed

Breaking Changes

  • The swift_module= tag on cc_library targets no longer does anything, and the swift_c_module rule was removed: #1191 and #1224
    • Use the new swift_interop_hint aspect hint instead
    • There were also some changes to how the apple_common.Objc provider is handled (e.g. d68b214)
  • The deprecated swift proto library rules were removed: #1193
  • The Bzlmod module.compatibility_level was increased: #1214
    • If you ruleset can support both pre-2.0 and post-2.0 rules_swift, please set bazel_dep.max_compatibility_level = 2 instead of bumping your minimum supported version of rules_swift
  • The swift.disable_system_index feature is now enabled by default: #1252
  • Removed swift.emit_symbol_graph feature: #1229
    • Use the new swift_symbol_graph_extract rule
  • Removed the swift.use_response_files feature: #1275
  • Removed the swift.bundled_xctests feature: #1272
  • Removed the implicit output from swift_library: #1260
  • Moved swift_usage_aspect and SwiftUsageInfo from rules_swift into rules_apple: #1223
  • Manually specifying the -index-store-path flag while also using the swift.index_while_building is no longer supported: #1248
  • It is now an error to specify both swiftinterface and swiftmodule in swift_import: #1253

Deprecations

  • Moved rules and other build definitions into their own public files and deprecated the umbrella swift.bzl and proto.bzl files: #1231, #1236, and #1255
    • Please update your load statements as the swift.bzl file will be removed in the next major release

Other changes

  • Added support for symbol graph extraction with the swift_symbol_graph_extract rule: #772, #1195, #1246, #1270, and #1271
  • Added support for the fdo_instrument_order_file feature: #1251
  • Added the swift.add_target_name_to_output feature, which allows multiple targets in a package to produce the same module name in the same build: #1098 and #1217
  • Added the swift.thin_lto and swift.full_lto features to enable LTO: #1208
  • Added the swift.propagate_generated_module_map feature to propagate the generated module map: #1212
  • Added the swift.headers_always_action_inputs feature which causes all headers to always be included as inputs to SwiftCompile actions, even when using explicit modules: #1249
  • Added an API to compile a .swiftinterface file into a .swiftmodule: #1250
  • Added an XCTest observer to swift_test targets that generates a JUnit-style XML log at the path in the XML_OUTPUT_PATH environment variable defined by Bazel: #1222, #1242, #1263, and #1273
  • Added a discover_tests attribute to swift_test: #1259, #1266, #1273, and #1274
  • Added a mechanism to provide a list of protocol names for constant value extraction: #1170
  • Added a swift_common.get_toolchain helper function: #1226, #1257, and #1258
  • resource_set is now defined for SwiftCompile actions: #1241
  • Swift compiler sandboxing is now disabled when using Xcode 15.3+, which fixes nested sandboxing errors: #1206
  • We now correctly add .swiftmodule directories to the search path: #1245
  • We now correctly calculate the minimum supported OS when calculating the target triple for 'arm64-apple-ios-simulator' targets: #1247
  • The new driver is now used on Xcode 14+ since it contains the fixes in swiftlang/swift-driver#1036: #1268
  • Removed some no-longer-relevant "supports X" features: #1267
  • Fixed LLDB expr evaluation for swift_{binary,test} targets only containing Swift in their srcs: #1269

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.0.0-rc1", 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 = "4ed76051139b7b95fb7e4884e6728af8b7ac77e7c80589a7c9f8f6dd106e53c9",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.0.0-rc1/rules_swift.2.0.0-rc1.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()

1.18.0

05 Apr 15:08
ea2d4bd
Compare
Choose a tag to compare

What's Changed

  • Remove unnecessary uses of ctx.resolve_tools (Thanks, @tjgq!)
  • Update apple_support to 1.15.1 (Thanks, @luispadron!)
  • Update swift_import docs and add warning (Thanks, @luispadron!)
  • Add swift_proto_library_group rule (Thanks, @AttilaTheFun!)

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 = "1.18.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 = "bb01097c7c7a1407f8ad49a1a0b1960655cf823c26ad2782d0b7d15b323838e2",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/1.18.0/rules_swift.1.18.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()

Full Changelog: 1.17.0...1.18.0

1.17.0

22 Mar 15:49
a20c388
Compare
Choose a tag to compare

What's Changed

  • Replace instances of to_json() method with json.encode(...) (Thanks, @c-mita!)
  • Add swift.emit_swiftdoc and swift.emit_swiftsourceinfo features to control Bazel tracking the .swiftdoc and .swiftsourceinfo files (Thanks, @chiragramani!)
  • Add swift.emit_private_swiftinterface feature to control emitting .private.swiftinterface files (Thanks, @luispadron!)
  • Add the swift_proto_library rules (Thanks, @AttilaTheFun!)

This release is compatible with 6.x LTS, 7.x LTS, and bazel 8.x rolling releases

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "1.17.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 = "9bc9dc949062405412404c0f07f7323ba310f3f91f42af414ac27e338ba7bb8c",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/1.17.0/rules_swift.1.17.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()