Skip to content

Releases: bazelbuild/rules_swift

3.4.0

25 Nov 19:43
ad91f42

Choose a tag to compare

What's Changed

  • Fix last_green bazel support by @keith in #1606
  • feat(examples): make -cxx-interoperability-mode a feature by @ma-oli in #1567
  • Support additional_linker_inputs in swift_binary by @adincebic in #1584
  • feat(swift): add embedded Swift feature by @ma-oli in #1608
  • feat(toolchain): add embedded OS support in swift toolchain by @ma-oli in #1609
  • feat(toolchain): add missing action types to toolchain configs by @ma-oli in #1611
  • Allow setting exec_group in more places by @brentleyjones in #1588
  • Fix SWIFT_TOOLCHAIN_TYPE to work with Bzlmod + AEGs by @brentleyjones in #1587
  • refactor(toolchain): fix --plugin-path on non-Xcode toolchains by @ma-oli in #1610
  • Fix windows toolchain target_compatible_with by @keith in #1616
  • Move the C++ toolchain into its own execution group so that it does not have to be bound by the same constraints as the execution platform selected for the Swift toolchain. by @brentleyjones in #1586
  • Enable support for AEGs by @brentleyjones in #1585
  • Add rpaths for the toolchain's compatibility back-deployment librarie by @adincebic in #1589

Full Changelog: 3.3.0...3.4.0

This release is compatible with Bazel 7.x LTS, 8.x LTS, and 9.x rolling releases.

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "3.4.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 = "13219bde174594c7af5403c7f3f41c37d1a62041294a0fd14c0834ca472fa8dc",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/3.4.0/rules_swift.3.4.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()

3.3.0

10 Nov 14:26
df2e46c

Choose a tag to compare

What's Changed

  • Include copts in WMO feature detection by @ma-oli in #1598
  • Fix error when CC_TARGET_TRIPLE is passed by @ma-oli in #1596
  • Handle Xcode version starting with path separator by @ma-oli in #1597
  • Fix some bazel @ HEAD compatibility by @keith

Full Changelog: 3.2.0...3.3.0

This release is compatible with Bazel 7.x LTS, 8.x LTS, and 9.x rolling releases.

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "3.3.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 = "94136edf1ccdc7b9bb68ff85e006fe698ea161a02fbee55ba1feb4ce71522cfb",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/3.3.0/rules_swift.3.3.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()

3.2.0

31 Oct 18:30
43b6224

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.1.2...3.2.0

This release is compatible with Bazel 7.x LTS, 8.x LTS, and 9.x rolling releases.

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "3.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 = "e07a9870c2b2023a1212cb8ea7f436f26d68acddae99c868abb0fab710a247d9",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/3.2.0/rules_swift.3.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()

3.1.2

06 Aug 23:37
3025d8f

Choose a tag to compare

What's Changed

  • Merge Swift and Clang entries in .swift-explicit-module-map.json by @ileitch in #1545
  • Pass -file-compilation-dir . explicitly to the Swift driver so that .swiftmodule files are hermetic. by @adincebic in #1554
  • Insert -plugin-path for testing macros location when building tests by @aaronsky in #1555

New Contributors

Full Changelog: 3.1.1...3.1.2

This release is compatible with Bazel 7.x LTS, 8.x LTS, and 9.x rolling releases.

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "3.1.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 = "5eff717c18bb513285b499add68f2331509cd4e411ff085e96a86b3342c1e5aa",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/3.1.2/rules_swift.3.1.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()

3.1.1

15 Jul 01:31
bffd22a

Choose a tag to compare

What's Changed

  • Fix dropping args when checking for -Xwrapped-swift arg in worker by @luispadron in #1551

Full Changelog: 3.1.0...3.1.1

This release is compatible with Bazel 7.x LTS, 8.x LTS, and 9.x rolling releases.

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "3.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 = "a05b5aa112278c0f934fa8352c07b489f92014f437349b12e074bd0b12f53e30",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/3.1.1/rules_swift.3.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()

3.1.0

09 Jul 18:51
6d28b81

Choose a tag to compare

What's Changed

  • Add always_include_developer_search_paths to mixed_language_library by @jschear in #1539
  • Add clang_deps attr to mixed_language_library by @jschear in #1540
  • Use ctx.coverage_instrumented to detect if a target should be instrumented by @brentleyjones in #1547
  • Fix rules_cc for 7.x WORKSPACE/non-bzlmod users by @aaronsky in #1549
  • Fix .swiftsourceinfo readonly bugs in version 3+ by @luispadron in #1550

Full Changelog: 3.0.2...3.1.0

This release is compatible with Bazel 7.x LTS, 8.x LTS, and 9.x rolling releases.

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "3.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 = "a7753fc930005bd1fffde96a63b562db873d58d5ad07752c1f7e16581feb4bb6",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/3.1.0/rules_swift.3.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.9.0

12 Jun 21:43
aa175e1

Choose a tag to compare

What's Changed

  • Add always_include_developer_search_paths to `mixed_language_librar… by @jschear in #1541
  • Add clang_deps attr to mixed_language_library (#1540) by @jschear in #1542

Full Changelog: 2.8.2...2.9.0

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

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "2.9.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 = "f7a67197cd8a79debfe70b8cef4dc19d03039af02cc561e31e0718e98cad83ac",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.9.0/rules_swift.2.9.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()

3.0.2

10 Jun 20:10
947fdac

Choose a tag to compare

Breaking changes

Fixed

Added

Changed

  • Update doc/README.md by @brentleyjones in #1428
  • Change swift_library alwayslink default to True by @brentleyjones in #1398
  • Warn instead of fail when swiftc not found on Linux by @brentleyjones in #1433
  • Prefer Swift toolchain clang over system clang by @brentleyjones in #1434
  • Stop trying to extract symbol graphs from actions that don’t compile Swift or Objective-C code by @brentleyjones in #1435
  • Allow swift_cross_import_overlay to specify a disambiguating explicit module name for the declaring and/or bystanding module by @brentleyjones in #1417
  • Put the swift_overlay's deps SwiftInfos into the transitive SwiftInfos of the propagated SwiftInfo instead of the direct SwiftInfos (which causes them to be merged with the overlay module itself) by @brentleyjones in #1438
  • Don't drop compilation contexts for private_deps when compiling the target that imports them by @brentleyjones in #1437
  • Update docs to say that a source file should only be in a single swift_* target, and a swift_overlay should only be referenced by a single other target's aspect_hints by @brentleyjones in #1439
  • Set alwayslink on the clang target of mixed_language_library as well by @brentleyjones in #1451
  • Stop using config.string(allow_multiple = True) by @EdSchouten in #1452
  • Make sure that the path to the generated header in the generated module map is workspace-relative when the feature configuration asks for it by @brentleyjones in #1442
  • Don't drop swift_overlay linking contexts when an overlay depends on another library that has an overlay by @brentleyjones in #1440
  • Apply -enable-bare-slash-regex action config to SWIFT_ACTION_DERIVE_F… by @jschear in #1464
  • Map const-values in output file map for incremental by @vikage in #1471
  • Include swift_proto_library attrs in compilation by @sebastianv1 in #1473
  • Mark non_module_deps extension as reproducible by @cerisier in #1481
  • Print a warning, instead of an error, when not finding swiftc.exe by @brentleyjones in #1483
  • Create fewer Xcode toolchains by @brentleyjones in #1487
  • Always create all toolchains by @brentleyjones in #1488
  • Only warn about missing swiftc on matching host platform by @brentleyjones in #1490
  • Support swift plugins in mixed_language_library by @qyang-nj in #1493
  • Deduplicate plugin arguments by @qyang-nj in #1495
  • Update swift.suppress_warnings comment by @mattrobmattrob in #1499
  • Use exec_group for SWIFT_ACTION_DERIVE_FILES and SWIFT_ACTION_DUMP_AST by @brentleyjones in #1510
  • Only pass the strict Obj-C include paths from direct dependencies to compilation actions by @luispadron in #1516
  • Use a different attribute than features on toolchain rules to specify which features should be enabled/disabled by default for all targets built with that toolchain by @luispadron in #1519
  • Use a new provider to wrap symbol graph extraction used for test discovery by @luispadron in #1521
  • Ensure that swift_synthesize_interface_aspect generates unique outputs by @luispadron in #1526
  • Remove prints when toolchain is skipped by @keith in #1535

Removed

  • Remove apple_common.Objc provider usage related to linking now that the Apple linking logic in Bazel gets everything from CcInfo by @brentleyjones in #1383
  • Remove implicit dependencies of _allowlist_function_transition in third_party by @brentleyjones in #1402
  • Remove unnecessary SwiftBinaryInfo required provider from plugins attribute by @brentleyjones in #1445
  • Remove redundant code in swift_import by @brentleyjones in #1446

New Contributors

Read more

3.0.0

09 Jun 19:57
def32f3

Choose a tag to compare

3.0.0 Pre-release
Pre-release

DO NOT USE.

2.8.2

06 May 19:58
5c45bce

Choose a tag to compare

What's Changed

Full Changelog: 2.8.1...2.8.2

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

MODULE.bazel Snippet

bazel_dep(name = "rules_swift", version = "2.8.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 = "a632eaf9d0d7564ae7dbd12f94fc2047cc00706a7f037a4af1fc10e20b7875a4",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.8.2/rules_swift.2.8.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()