Skip to content

Commit ecd5ff8

Browse files
committed
Update docs
1 parent 647f38d commit ecd5ff8

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

doc/providers.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,32 @@ where the arguments are:
4848
When reading an existing `SwiftInfo` provider, it has the two fields described
4949
below.
5050

51+
This provider has a custom initializer that will merge the transitive modules of
52+
a list of `SwiftInfo` providers, rather than a separate "merge" function. The
53+
correct signature when _creating_ a new `SwiftInfo` provider is the following:
54+
55+
```build
56+
SwiftInfo(
57+
direct_swift_infos,
58+
modules,
59+
swift_infos,
60+
)
61+
```
62+
63+
where the arguments are:
64+
65+
* `direct_swift_infos`: A list of `SwiftInfo` providers from dependencies
66+
whose direct modules should be treated as direct modules in the resulting
67+
provider, in addition to their transitive modules being merged.
68+
* `modules`: A list of values (as returned by `create_swift_module_context`)
69+
that represent Clang and/or Swift module artifacts that are direct outputs
70+
of the target being built.
71+
* `swift_infos`: A list of `SwiftInfo` providers from dependencies whose
72+
transitive modules should be merged into the resulting provider.
73+
74+
When reading an existing `SwiftInfo` provider, it has the two fields described
75+
below.
76+
5177
**FIELDS**
5278

5379

0 commit comments

Comments
 (0)