Skip to content

Commit 01ea71d

Browse files
authored
Fix bad docc argument for multiple symbol graphs (#2511)
1 parent 91be02a commit 01ea71d

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

apple/internal/docc.bzl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ def _docc_archive_impl(ctx):
9797

9898
# Add symbol graphs
9999
if symbol_graphs_info:
100-
arguments.add_all("--additional-symbol-graph-dir", symbol_graphs_info.symbol_graphs, expand_directories = False)
100+
arguments.add_all(
101+
symbol_graphs_info.symbol_graphs,
102+
before_each = "--additional-symbol-graph-dir",
103+
expand_directories = False,
104+
)
101105
docc_build_inputs.extend(symbol_graphs_info.symbol_graphs)
102106

103107
# The .docc bundle (if provided, only one is allowed)

test/starlark_tests/docc_tests.bzl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def docc_test_suite(name):
5757
"$BUNDLE_ROOT/index.html",
5858
"$BUNDLE_ROOT/documentation/basicframework/readme/index.html",
5959
],
60-
text_file_not_contains = [],
6160
text_test_file = "$BUNDLE_ROOT/metadata.json",
6261
text_test_values = [
6362
"\"bundleDisplayName\":\"BasicFramework\"",
@@ -78,7 +77,6 @@ def docc_test_suite(name):
7877
"$BUNDLE_ROOT/index.html",
7978
"$BUNDLE_ROOT/documentation/basiclib/readme/index.html",
8079
],
81-
text_file_not_contains = [],
8280
text_test_file = "$BUNDLE_ROOT/metadata.json",
8381
text_test_values = [
8482
"\"bundleDisplayName\":\"BasicLib\"",
@@ -99,7 +97,6 @@ def docc_test_suite(name):
9997
"$BUNDLE_ROOT/index.html",
10098
"$BUNDLE_ROOT/documentation/basicframework/readme/index.html",
10199
],
102-
text_file_not_contains = [],
103100
text_test_file = "$BUNDLE_ROOT/index.html",
104101
text_test_values = [
105102
"<script defer=\"defer\" src=\"/custom/base/path/js/",
@@ -108,6 +105,18 @@ def docc_test_suite(name):
108105
tags = [name],
109106
)
110107

108+
# Verifying multiple symbol graph conversion via transitive dependencies.
109+
archive_contents_test(
110+
name = "{}_contains_doccarchive_with_transitive_dependencies".format(name),
111+
build_type = "simulator",
112+
target_under_test = "//test/starlark_tests/targets_under_test/ios:basic_framework_with_transitive_dependency.doccarchive",
113+
contains = [
114+
"$BUNDLE_ROOT/index.html",
115+
"$BUNDLE_ROOT/documentation/transitivedependencytest/index.html",
116+
],
117+
tags = [name],
118+
)
119+
111120
native.test_suite(
112121
name = name,
113122
tags = [name],

test/starlark_tests/targets_under_test/ios/BUILD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5039,6 +5039,14 @@ docc_archive(
50395039
hosting_base_path = "custom/base/path",
50405040
)
50415041

5042+
docc_archive(
5043+
name = "basic_framework_with_transitive_dependency.doccarchive",
5044+
dep = ":basic_framework_with_transitive_dependency",
5045+
fallback_bundle_identifier = "com.google.example.framework",
5046+
fallback_bundle_version = "1.0",
5047+
fallback_display_name = "BasicFramework",
5048+
)
5049+
50425050
# ---------------------------------------------------------------------------------------
50435051
# Target for extension resource bundling.
50445052

0 commit comments

Comments
 (0)