Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ A provider whose type/layout is an implementation detail and should not
## derive_swift_module_name

<pre>
derive_swift_module_name(<a href="#derive_swift_module_name-args">*args</a>)
derive_swift_module_name(<a href="#derive_swift_module_name-args">*args</a>, <a href="#derive_swift_module_name-feature_configuration">feature_configuration</a>)
</pre>

Returns a derived module name from the given build label.
Expand All @@ -125,6 +125,7 @@ This mapping is intended to be fairly predictable, but not reversible.

| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="derive_swift_module_name-feature_configuration"></a>feature_configuration | Optional Swift feature configuration. Accepted for compatibility with existing callers; currently unused. | `None` |
| <a id="derive_swift_module_name-args"></a>args | Either a single argument of type `Label`, or two arguments of type `str` where the first argument is the package name and the second argument is the target name. | none |

**RETURNS**
Expand Down
7 changes: 6 additions & 1 deletion swift/module_name.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ load("@bazel_skylib//lib:types.bzl", "types")

visibility("public")

def derive_swift_module_name(*args):
def derive_swift_module_name(
*args,
# buildifier: disable=unused-variable
feature_configuration = None):
Comment thread
keith marked this conversation as resolved.
"""Returns a derived module name from the given build label.

For targets whose module name is not explicitly specified, the module name
Expand All @@ -40,6 +43,8 @@ def derive_swift_module_name(*args):
*args: Either a single argument of type `Label`, or two arguments of
type `str` where the first argument is the package name and the
second argument is the target name.
feature_configuration: Optional Swift feature configuration. Accepted
for compatibility with existing callers; currently unused.

Returns:
The module name derived from the label.
Expand Down
Loading