Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade stardoc to 0.7.1 #1407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ register_toolchains("@build_bazel_rules_swift_local_config//:all")
# Dev dependencies
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.33.0", dev_dependency = True, repo_name = "bazel_gazelle")
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
bazel_dep(name = "stardoc", version = "0.7.1", dev_dependency = True, repo_name = "io_bazel_stardoc")

http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you run into any problems with these rules, please
Create a simple CLI that can run on macOS, Linux, or Windows:

```bzl
load("@build_bazel_rules_swift//swift:swift_binary.bzl", "swift_binary")
load("@rules_swift//swift:swift_binary.bzl", "swift_binary")

swift_binary(
name = "cli",
Expand All @@ -29,7 +29,7 @@ Create a single library target that can be used by other targets in your
build:

```bzl
load("@build_bazel_rules_swift//swift:swift_library.bzl", "swift_library")
load("@rules_swift//swift:swift_library.bzl", "swift_library")

swift_library(
name = "MyLibrary",
Expand Down Expand Up @@ -92,7 +92,7 @@ toolchain's Info.plist file.
To list the available toolchains and their bundle identifiers, you can run:

```command
bazel run @build_bazel_rules_swift//tools/dump_toolchains
bazel run @rules_swift//tools/dump_toolchains
```

**Linux hosts:** At this time, Bazel uses whichever `swift` executable is
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ http_archive(
# so we declare it in the WORKSPACE
http_archive(
name = "io_bazel_stardoc",
sha256 = "62bd2e60216b7a6fec3ac79341aa201e0956477e7c8f6ccc286f279ad1d96432",
sha256 = "fabb280f6c92a3b55eed89a918ca91e39fb733373c81e87a18ae9e33e75023ec",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz",
"https://github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.7.1/stardoc-0.7.1.tar.gz",
"https://github.com/bazelbuild/stardoc/releases/download/0.7.1/stardoc-0.7.1.tar.gz",
],
)

Expand Down
24 changes: 24 additions & 0 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ compilation and/or linking as part of their implementation.
## swift_common.cc_feature_configuration

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.cc_feature_configuration(<a href="#swift_common.cc_feature_configuration-feature_configuration">feature_configuration</a>)
</pre>

Expand All @@ -33,6 +35,8 @@ A C++ `FeatureConfiguration` value (see
## swift_common.compile

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.compile(<a href="#swift_common.compile-actions">actions</a>, <a href="#swift_common.compile-additional_inputs">additional_inputs</a>, <a href="#swift_common.compile-cc_infos">cc_infos</a>, <a href="#swift_common.compile-copts">copts</a>, <a href="#swift_common.compile-defines">defines</a>, <a href="#swift_common.compile-exec_group">exec_group</a>,
<a href="#swift_common.compile-extra_swift_infos">extra_swift_infos</a>, <a href="#swift_common.compile-feature_configuration">feature_configuration</a>, <a href="#swift_common.compile-generated_header_name">generated_header_name</a>, <a href="#swift_common.compile-is_test">is_test</a>,
<a href="#swift_common.compile-include_dev_srch_paths">include_dev_srch_paths</a>, <a href="#swift_common.compile-module_name">module_name</a>, <a href="#swift_common.compile-objc_infos">objc_infos</a>, <a href="#swift_common.compile-package_name">package_name</a>, <a href="#swift_common.compile-plugins">plugins</a>,
Expand Down Expand Up @@ -118,6 +122,8 @@ A `struct` with the following fields:
## swift_common.compile_module_interface

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.compile_module_interface(<a href="#swift_common.compile_module_interface-actions">actions</a>, <a href="#swift_common.compile_module_interface-clang_module">clang_module</a>, <a href="#swift_common.compile_module_interface-compilation_contexts">compilation_contexts</a>, <a href="#swift_common.compile_module_interface-copts">copts</a>,
<a href="#swift_common.compile_module_interface-exec_group">exec_group</a>, <a href="#swift_common.compile_module_interface-feature_configuration">feature_configuration</a>, <a href="#swift_common.compile_module_interface-is_framework">is_framework</a>, <a href="#swift_common.compile_module_interface-module_name">module_name</a>,
<a href="#swift_common.compile_module_interface-swiftinterface_file">swiftinterface_file</a>, <a href="#swift_common.compile_module_interface-swift_infos">swift_infos</a>, <a href="#swift_common.compile_module_interface-swift_toolchain">swift_toolchain</a>, <a href="#swift_common.compile_module_interface-target_name">target_name</a>)
Expand Down Expand Up @@ -158,6 +164,8 @@ A Swift module context (as returned by `create_swift_module_context`)
## swift_common.configure_features

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.configure_features(<a href="#swift_common.configure_features-ctx">ctx</a>, <a href="#swift_common.configure_features-swift_toolchain">swift_toolchain</a>, <a href="#swift_common.configure_features-requested_features">requested_features</a>, <a href="#swift_common.configure_features-unsupported_features">unsupported_features</a>)
</pre>

Expand Down Expand Up @@ -192,6 +200,8 @@ An opaque value representing the feature configuration that can be
## swift_common.create_compilation_context

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.create_compilation_context(<a href="#swift_common.create_compilation_context-defines">defines</a>, <a href="#swift_common.create_compilation_context-srcs">srcs</a>, <a href="#swift_common.create_compilation_context-transitive_modules">transitive_modules</a>)
</pre>

Expand Down Expand Up @@ -225,6 +235,8 @@ A `struct` containing four fields:
## swift_common.create_linking_context_from_compilation_outputs

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.create_linking_context_from_compilation_outputs(<a href="#swift_common.create_linking_context_from_compilation_outputs-actions">actions</a>, <a href="#swift_common.create_linking_context_from_compilation_outputs-additional_inputs">additional_inputs</a>, <a href="#swift_common.create_linking_context_from_compilation_outputs-alwayslink">alwayslink</a>,
<a href="#swift_common.create_linking_context_from_compilation_outputs-compilation_outputs">compilation_outputs</a>,
<a href="#swift_common.create_linking_context_from_compilation_outputs-feature_configuration">feature_configuration</a>, <a href="#swift_common.create_linking_context_from_compilation_outputs-is_test">is_test</a>,
Expand Down Expand Up @@ -274,6 +286,8 @@ A tuple of `(CcLinkingContext, CcLinkingOutputs)` containing the linking
## swift_common.extract_symbol_graph

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.extract_symbol_graph(<a href="#swift_common.extract_symbol_graph-actions">actions</a>, <a href="#swift_common.extract_symbol_graph-compilation_contexts">compilation_contexts</a>, <a href="#swift_common.extract_symbol_graph-emit_extension_block_symbols">emit_extension_block_symbols</a>,
<a href="#swift_common.extract_symbol_graph-feature_configuration">feature_configuration</a>, <a href="#swift_common.extract_symbol_graph-include_dev_srch_paths">include_dev_srch_paths</a>, <a href="#swift_common.extract_symbol_graph-minimum_access_level">minimum_access_level</a>,
<a href="#swift_common.extract_symbol_graph-module_name">module_name</a>, <a href="#swift_common.extract_symbol_graph-output_dir">output_dir</a>, <a href="#swift_common.extract_symbol_graph-swift_infos">swift_infos</a>, <a href="#swift_common.extract_symbol_graph-swift_toolchain">swift_toolchain</a>)
Expand Down Expand Up @@ -303,6 +317,8 @@ Extracts the symbol graph from a Swift module.
## swift_common.get_toolchain

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.get_toolchain(<a href="#swift_common.get_toolchain-ctx">ctx</a>, <a href="#swift_common.get_toolchain-exec_group">exec_group</a>, <a href="#swift_common.get_toolchain-mandatory">mandatory</a>, <a href="#swift_common.get_toolchain-attr">attr</a>)
</pre>

Expand All @@ -329,6 +345,8 @@ A `SwiftToolchainInfo` provider, or `None` if the toolchain was not
## swift_common.is_enabled

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.is_enabled(<a href="#swift_common.is_enabled-feature_configuration">feature_configuration</a>, <a href="#swift_common.is_enabled-feature_name">feature_name</a>)
</pre>

Expand Down Expand Up @@ -357,6 +375,8 @@ check it.
## swift_common.precompile_clang_module

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.precompile_clang_module(<a href="#swift_common.precompile_clang_module-actions">actions</a>, <a href="#swift_common.precompile_clang_module-cc_compilation_context">cc_compilation_context</a>, <a href="#swift_common.precompile_clang_module-exec_group">exec_group</a>,
<a href="#swift_common.precompile_clang_module-feature_configuration">feature_configuration</a>, <a href="#swift_common.precompile_clang_module-module_map_file">module_map_file</a>, <a href="#swift_common.precompile_clang_module-module_name">module_name</a>,
<a href="#swift_common.precompile_clang_module-swift_toolchain">swift_toolchain</a>, <a href="#swift_common.precompile_clang_module-target_name">target_name</a>, <a href="#swift_common.precompile_clang_module-swift_infos">swift_infos</a>)
Expand Down Expand Up @@ -390,6 +410,8 @@ A struct containing the precompiled module and optional indexstore directory,
## swift_common.toolchain_attrs

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.toolchain_attrs(<a href="#swift_common.toolchain_attrs-toolchain_attr_name">toolchain_attr_name</a>)
</pre>

Expand Down Expand Up @@ -436,6 +458,8 @@ A new attribute dictionary that can be added to the attributes of a
## swift_common.use_toolchain

<pre>
load("@rules_swift//doc:doc.bzl", "swift_common")

swift_common.use_toolchain(<a href="#swift_common.use_toolchain-mandatory">mandatory</a>)
</pre>

Expand Down
22 changes: 17 additions & 5 deletions doc/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ On this page:
## SwiftInfo

<pre>
SwiftInfo(<a href="#SwiftInfo-direct_modules">direct_modules</a>, <a href="#SwiftInfo-transitive_modules">transitive_modules</a>)
load("@rules_swift//doc:doc.bzl", "SwiftInfo")

SwiftInfo(<a href="#SwiftInfo-_init-direct_swift_infos">direct_swift_infos</a>, <a href="#SwiftInfo-_init-modules">modules</a>, <a href="#SwiftInfo-_init-swift_infos">swift_infos</a>)
</pre>

Contains information about the compiled artifacts of a Swift module.
Expand Down Expand Up @@ -48,8 +50,15 @@ where the arguments are:
When reading an existing `SwiftInfo` provider, it has the two fields described
below.

**FIELDS**
**CONSTRUCTOR PARAMETERS**

| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| <a id="SwiftInfo-_init-direct_swift_infos"></a>direct_swift_infos | <p align="center">-</p> | `[]` |
| <a id="SwiftInfo-_init-modules"></a>modules | <p align="center">-</p> | `[]` |
| <a id="SwiftInfo-_init-swift_infos"></a>swift_infos | <p align="center">-</p> | `[]` |

**FIELDS**

| Name | Description |
| :------------- | :------------- |
Expand All @@ -62,14 +71,15 @@ below.
## SwiftProtoCompilerInfo

<pre>
load("@rules_swift//doc:doc.bzl", "SwiftProtoCompilerInfo")

SwiftProtoCompilerInfo(<a href="#SwiftProtoCompilerInfo-bundled_proto_paths">bundled_proto_paths</a>, <a href="#SwiftProtoCompilerInfo-compile">compile</a>, <a href="#SwiftProtoCompilerInfo-compiler_deps">compiler_deps</a>, <a href="#SwiftProtoCompilerInfo-internal">internal</a>)
</pre>

Provides information needed to generate Swift code from `ProtoInfo` providers

**FIELDS**


| Name | Description |
| :------------- | :------------- |
| <a id="SwiftProtoCompilerInfo-bundled_proto_paths"></a>bundled_proto_paths | List of proto paths for which to skip generation because they're built into the modules imported by the generated Swift proto code, e.g., SwiftProtobuf. |
Expand All @@ -83,14 +93,15 @@ Provides information needed to generate Swift code from `ProtoInfo` providers
## SwiftProtoInfo

<pre>
load("@rules_swift//doc:doc.bzl", "SwiftProtoInfo")

SwiftProtoInfo(<a href="#SwiftProtoInfo-module_name">module_name</a>, <a href="#SwiftProtoInfo-module_mappings">module_mappings</a>, <a href="#SwiftProtoInfo-direct_pbswift_files">direct_pbswift_files</a>, <a href="#SwiftProtoInfo-pbswift_files">pbswift_files</a>)
</pre>

Propagates Swift-specific information about a `proto_library`.

**FIELDS**


| Name | Description |
| :------------- | :------------- |
| <a id="SwiftProtoInfo-module_name"></a>module_name | The name of the Swift module compiled from the `swift_proto_library` which produced this provider. |
Expand All @@ -104,6 +115,8 @@ Propagates Swift-specific information about a `proto_library`.
## SwiftToolchainInfo

<pre>
load("@rules_swift//doc:doc.bzl", "SwiftToolchainInfo")

SwiftToolchainInfo(<a href="#SwiftToolchainInfo-action_configs">action_configs</a>, <a href="#SwiftToolchainInfo-cc_language">cc_language</a>, <a href="#SwiftToolchainInfo-cc_toolchain_info">cc_toolchain_info</a>, <a href="#SwiftToolchainInfo-clang_implicit_deps_providers">clang_implicit_deps_providers</a>,
<a href="#SwiftToolchainInfo-const_protocols_to_gather">const_protocols_to_gather</a>, <a href="#SwiftToolchainInfo-cross_import_overlays">cross_import_overlays</a>, <a href="#SwiftToolchainInfo-debug_outputs_provider">debug_outputs_provider</a>,
<a href="#SwiftToolchainInfo-developer_dirs">developer_dirs</a>, <a href="#SwiftToolchainInfo-entry_point_linkopts_provider">entry_point_linkopts_provider</a>, <a href="#SwiftToolchainInfo-feature_allowlists">feature_allowlists</a>,
Expand All @@ -117,7 +130,6 @@ that use the toolchain.

**FIELDS**


| Name | Description |
| :------------- | :------------- |
| <a id="SwiftToolchainInfo-action_configs"></a>action_configs | This field is an internal implementation detail of the build rules. |
Expand Down
Loading