Releases: bazelbuild/rules_swift
0.11.1
- This release is tested with Bazel 0.27
- The
swift_common.run_toolchain{_shell_,_swift_,_}actionfunctions have been removed. (d11785b)
Please use the rules_swift.0.11.1.tar.gz release asset from your Bazel WORKSPACE.
SHA-256 digest: 96a86afcbdab215f8363e65a10cf023b752e90b23abf02272c4fc668fcb70311
0.11.0
- This release is tested with Bazel 0.26.
- On Linux, the Swift toolchain can now autoconfigure itself to detect which features are supported by the version of the compiler in use. (a7f4adb)
Thanks to the following contributors:
- Danny Weinberg (@FuegoFro): 01c5d85
- Dave Lee (@kastiglione): b4c87bf, 37dd0ef
- Keith Smiley (@keith): 5161cb8
Please use the rules_swift.0.11.0.tar.gz release asset from your Bazel WORKSPACE.
SHA-256 digest: 245290b9c01950db0903bcb6575b358f8f8cfc3bbd36a1c72566e4608a701dbc
0.10.1
- This release is tested with Bazel 0.25.
- Introduce
swift_common.compileand removeswift_common.compile_as_{library,objects}. (606d50b, 4f69fc1) - The
direct_libraries,direct_linkopts,transitive_additional_inputs,transitive_libraries, andtransitive_linkoptsfields ofSwiftInfohave been removed. This information is now propagated using linking contexts inCcInfoproviders. (9e60959) - The
SwiftClangModuleInfoprovider has been deprecated. Headers and include search paths can be obtained fromCcInfo's compilation context. Module maps are propagated inSwiftInfo.transitive_modulemaps. (6fcd64b) - On macOS hosts, you can use a custom toolchain installed in
/Library/Developer/Toolchainsby passing--define=SWIFT_CUSTOM_TOOLCHAIN=<toolchain id>to Bazel, where<toolchain id>is the bundle identifier of the toolchain. (4fa465e)- A tool has been added to dump the toolchain identifiers of any custom toolchains currently installed:
bazel run @build_bazel_rules_swift//tools/dump_toolchains. (1aec8de)
- A tool has been added to dump the toolchain identifiers of any custom toolchains currently installed:
Thanks to the following contributors:
Please use the rules_swift.0.10.1.tar.gz release asset from your Bazel WORKSPACE.
SHA-256 digest: fef40f8afc331ae4b63da5603538134444f005e5ca7762112b0629334602c845
0.9.0
- This release is tested with Bazel 0.24.1
- The
allow_testing,compilation_mode,configuration,objc_fragment, andswift_fragmentarguments have been removed from theswift_common.{compile_as_objects,compile_as_library,swiftc_command_line_and_inputs}functions. (ecd0250) - The
swift_grpc_libraryrule has been added, which can be used to generate Swift code for gRPC clients/servers. Necessary dependencies (gRPC and gRPC-Swift) are automatically added to the workspace. (9034f69) - Incremental compilation is now supported by passing the
--strategy=SwiftCompile=workerflag to Bazel. (637e3f1) - The
compile_optionsfield of theSwiftInfoprovider has been removed. TheSwiftBinaryInfoprovider has been removed. (b73e06d) swift_common.merge_swift_info_providersis now namedswift_common.merge_swift_infosand takes a list ofSwiftInfoproviders instead of a list of targets.swift_common.build_swift_infois now namedswift_common.create_swift_infoand only takes direct arguments and no longer merges transitive info from dependencies. (ef84822)- Like
cc_{binary,test},swift_{binary,test}now supports amallocattribute that lets the user substitute an alternatemallocimplementation to be linked into the binary. (5a9cd5d) - When building with Xcode 10.2 (Swift 5.0) or higher, the compiler now passes
-debug-prefix-mapto the compiler to remap the working directory to".", removing absolute source paths from the generated debug info. (23389cc)
Thanks to the following contributors:
Please use the rules_swift.0.9.0.tar.gz release asset from your Bazel WORKSPACE.
SHA-256 digest: 9efe9699e9765e6b4a5e063e4a08f6b163cccaf0443f775d935baf5c3cd6ed0e
0.8.0
- This release is tested with Bazel 0.24.
-simulatoris now added to the target triple passed toswiftc(e.g., "-target x86_64-apple-ios10.3-simulator") by the Xcode toolchain when targeting simulator platforms. (73c2508) Thanks @kastiglione!- The Xcode toolchain now supports dynamically linking to Swift runtimes distributed with the OS (which is the case on macOS 10.14.4 and higher). (d0f1415)
- The
allow_testingparameter toswift_common.compile_as_{library,objects}is now deprecated. To control testability of code compiled with these APIs, you should now set or unset the"swift.enable_testing"feature in your feature configuration. (62b3b4c) - The
objc_fragmentandswift_fragmentarguments toswift_commoncompilation APIs are now deprecated. (957cdae) - The
feature_configurationargument is now required for thecompile_as_objects,compile_as_library, andswiftc_command_line_and_inputsmethods inswift_common. (fb38185)
Thanks to the following contributors:
- Dave Lee (@kastiglione): 73c2508, 13acad9
- Keith Smiley (@keith): b22ce2b
Please use the rules_swift.0.8.0.tar.gz release asset from your Bazel WORKSPACE.
SHA-256 digest: 31aad005a9c4e56b256125844ad05eb27c88303502d74138186f9083479f93a6
0.7.0
-
This release is tested with Bazel 0.23.0.
-
swift_librarynow lists the Objective-C bridging header as one of its output files. -
The
cc_libsandmodule_link_nameattributes have been removed from the Swift rules. If you need to create a static library that contains both Swift and C++ code, have theswift_librarydepend on thecc_libraryand then use another rule, such as agenrule, to combine the archives.To replace the behavior of the
module_link_nameattribute, pass the-module-link-name <name>flags directly in the target'scopts. This change no longer affects the name of the output library; it is the responsibility of the user to ensure that the.afile that is output by the rule matches the link name embedded in the module. This allows the link name to refer to an archive emitted by a different rule, such as one that merges static archives as described above. -
Feature-related APIs in
swift_commonhave changed slightly. Theget_{disabled,enabled}_featuresmethods have been removed, andis_enabledhas been added. Also, the Swift feature configuration now embeds a C++ feature configuration (accessible by callingswift_common.cc_feature_configuration) for users who need to call C++ APIs with a feature configuration compatible with the Swift toolchain's underlying C++ toolchain. -
Uses of the legacy
"cc"provider have been migrated to the newCcInfoprovider. -
Uses of the legacy
"instrumented_files"provider have been migrated to the newInstrumentedFilesInfoprovider. -
Information in
SwiftInfoproviders is no longer lost when passing through a non-Swift target (such asobjc_library). In some cases, build graphs could be constructed that caused upstream Swift compilations to not be passed the.swiftmodulefiles they needed to perform type lookups.
0.6.0
- This release is tested with Bazel 0.21.0.
- Incompatible change: The
resourcesandstructured_resourcesofswift_libraryhave been removed. Replace them as follows:- Files and labels referenced in
resourcescan be placed directly in the library'sdataattribute. - Files and labels referenced in
structured_resourcesshould be moved to thestructured_resourcesof a newapple_resource_grouptarget (defined in rules_apple) and that target should be placed in the library'sdataattribute.
- Files and labels referenced in
0.5.0
- This release is tested with Bazel 0.20.0.
- Support linking prebuilt framework dependencies (
objc_frameworkand the newapple_framework_importrule in rules_apple) intoswift_{binary,test}targets. - Allow Objective-C rules to depend on
swift_importtargets. - Add
alwayslinksupport toswift_{binary,test}. - Add
-pieflag when linking on Linux. - Add descriptive progress messages to most actions.
- Add dependency on bazelbuild/apple_support.
0.4.0
- This release is tested with Bazel 0.19.0.
- Minor debugging improvements.
- Support batch mode compilation for Xcode 10 or higher (macOS only at this time).
- Propagate simple defines between Swift and Objective-C targets.
- Ensure that transitive headers are available when a
swift_librarydepends on acc_library, and that their include paths are correct. - A number of compatibility and cleanup fixes for more recent Bazel versions (thanks @keith and @kastiglione!)