Skip to content

Commit

Permalink
Update docs and fix buildifier failure
Browse files Browse the repository at this point in the history
  • Loading branch information
BalestraPatrick committed May 16, 2024
1 parent be307b2 commit 2bd5d82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,7 @@ A provider whose type/layout is an implementation detail and should not
<pre>
swift_common.create_swift_module(<a href="#swift_common.create_swift_module-swiftdoc">swiftdoc</a>, <a href="#swift_common.create_swift_module-swiftmodule">swiftmodule</a>, <a href="#swift_common.create_swift_module-ast_files">ast_files</a>, <a href="#swift_common.create_swift_module-defines">defines</a>, <a href="#swift_common.create_swift_module-indexstore">indexstore</a>, <a href="#swift_common.create_swift_module-plugins">plugins</a>,
<a href="#swift_common.create_swift_module-swiftsourceinfo">swiftsourceinfo</a>, <a href="#swift_common.create_swift_module-swiftinterface">swiftinterface</a>, <a href="#swift_common.create_swift_module-private_swiftinterface">private_swiftinterface</a>,
<a href="#swift_common.create_swift_module-const_gather_protocols">const_gather_protocols</a>,
<a href="#swift_common.create_swift_module-symbol_graph">symbol_graph</a>)
<a href="#swift_common.create_swift_module-const_gather_protocols">const_gather_protocols</a>, <a href="#swift_common.create_swift_module-symbol_graph">symbol_graph</a>)
</pre>

Creates a value representing a Swift module use as a Swift dependency.
Expand All @@ -484,6 +483,7 @@ Creates a value representing a Swift module use as a Swift dependency.
| <a id="swift_common.create_swift_module-plugins"></a>plugins | A list of `SwiftCompilerPluginInfo` providers representing compiler plugins that are required by this module and should be loaded by the compiler when this module is directly depended on. | `[]` |
| <a id="swift_common.create_swift_module-swiftsourceinfo"></a>swiftsourceinfo | The `.swiftsourceinfo` file emitted by the compiler for this module. May be `None` if no source info file was emitted. | `None` |
| <a id="swift_common.create_swift_module-swiftinterface"></a>swiftinterface | The `.swiftinterface` file emitted by the compiler for this module. May be `None` if no module interface file was emitted. | `None` |
| <a id="swift_common.create_swift_module-private_swiftinterface"></a>private_swiftinterface | The `.private.swiftinterface` file emitted by the compiler for this module. May be `None` if no private module interface file was emitted. | `None` |
| <a id="swift_common.create_swift_module-const_gather_protocols"></a>const_gather_protocols | A list of protocol names from which constant values should be extracted from source code that takes this module as a *direct* dependency. | `[]` |
| <a id="swift_common.create_swift_module-symbol_graph"></a>symbol_graph | A `File` representing the directory that contains the symbol graph data generated by the compiler if the `"swift.emit_symbol_graph"` feature is enabled, otherwise this will be `None`. | `None` |

Expand Down
4 changes: 2 additions & 2 deletions doc/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ swift_proto_library(
| <a id="swift_proto_library-additional_compiler_info"></a>additional_compiler_info | Dictionary of additional information passed to the compiler targets. See the documentation of the respective compiler rules for more information on which fields are accepted and how they are used. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | `{}` |
| <a id="swift_proto_library-always_include_developer_search_paths"></a>always_include_developer_search_paths | If `True`, the developer framework search paths will be added to the compilation command. This enables a Swift module to access `XCTest` without having to mark the target as `testonly = True`. | Boolean | optional | `False` |
| <a id="swift_proto_library-alwayslink"></a>alwayslink | If true, any binary that depends (directly or indirectly) on this Swift module will link in all the object files for the files listed in `srcs`, even if some contain no symbols referenced by the binary. This is useful if your code isn't explicitly called by code in the binary; for example, if you rely on runtime checks for protocol conformances added in extensions in the library but do not directly reference any other symbols in the object file that adds that conformance. | Boolean | optional | `False` |
| <a id="swift_proto_library-compilers"></a>compilers | One or more `swift_proto_compiler` targets (or targets producing `SwiftProtoCompilerInfo`), from which the Swift protos will be generated. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `["@build_bazel_rules_swift//proto/compilers:swift_proto"]` |
| <a id="swift_proto_library-compilers"></a>compilers | One or more `swift_proto_compiler` targets (or targets producing `SwiftProtoCompilerInfo`), from which the Swift protos will be generated. | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | `["@rules_swift//proto/compilers:swift_proto"]` |
| <a id="swift_proto_library-copts"></a>copts | Additional compiler options that should be passed to `swiftc`. These strings are subject to `$(location ...)` and ["Make" variable](https://docs.bazel.build/versions/master/be/make-variables.html) expansion. | List of strings | optional | `[]` |
| <a id="swift_proto_library-defines"></a>defines | A list of defines to add to the compilation command line.<br><br>Note that unlike C-family languages, Swift defines do not have values; they are simply identifiers that are either defined or undefined. So strings in this list should be simple identifiers, **not** `name=value` pairs.<br><br>Each string is prepended with `-D` and added to the command line. Unlike `copts`, these flags are added for the target and every target that depends on it, so use this attribute with caution. It is preferred that you add defines directly to `copts`, only using this feature in the rare case that a library needs to propagate a symbol up to those that depend on it. | List of strings | optional | `[]` |
| <a id="swift_proto_library-generated_header_name"></a>generated_header_name | The name of the generated Objective-C interface header. This name must end with a `.h` extension and cannot contain any path separators.<br><br>If this attribute is not specified, then the default behavior is to name the header `${target_name}-Swift.h`.<br><br>This attribute is ignored if the toolchain does not support generating headers. | String | optional | `""` |
Expand Down Expand Up @@ -674,7 +674,7 @@ swift_binary(
| Name | Description | Type | Mandatory | Default |
| :------------- | :------------- | :------------- | :------------- | :------------- |
| <a id="swift_proto_library_group-name"></a>name | A unique name for this target. | <a href="https://bazel.build/concepts/labels#target-names">Name</a> | required | |
| <a id="swift_proto_library_group-compiler"></a>compiler | A `swift_proto_compiler` target (or target producing `SwiftProtoCompilerInfo`), from which the Swift protos will be generated. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `"@build_bazel_rules_swift//proto/compilers:swift_proto"` |
| <a id="swift_proto_library_group-compiler"></a>compiler | A `swift_proto_compiler` target (or target producing `SwiftProtoCompilerInfo`), from which the Swift protos will be generated. | <a href="https://bazel.build/concepts/labels">Label</a> | optional | `"@rules_swift//proto/compilers:swift_proto"` |
| <a id="swift_proto_library_group-proto"></a>proto | Exactly one `proto_library` target (or target producing `ProtoInfo`), from which the Swift source files should be generated. | <a href="https://bazel.build/concepts/labels">Label</a> | required | |


Expand Down
5 changes: 0 additions & 5 deletions swift/internal/compiling.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1378,10 +1378,6 @@ def _emit_private_module_interface_path_configurator(prerequisites, args):
"""Adds the `.private.swiftinterface` output path to the command line."""
args.add("-emit-private-module-interface-path", prerequisites.private_swiftinterface_file)

def _emit_const_values_path_configurator(prerequisites, args):
"""Adds the `.swiftconst` output path to the command line."""
args.add("-emit-const-values-path", prerequisites.swiftconst_values)

def _emit_objc_header_path_configurator(prerequisites, args):
"""Adds the generated header output path to the command line."""
if prerequisites.generated_header_file:
Expand Down Expand Up @@ -2423,7 +2419,6 @@ def compile(
else:
const_gather_protocols_file = []


compile_outputs, other_outputs = _declare_compile_outputs(
srcs = srcs,
actions = actions,
Expand Down

0 comments on commit 2bd5d82

Please sign in to comment.