Skip to content

Commit

Permalink
Fix bad docc argument for multiple symbol graphs (#2511)
Browse files Browse the repository at this point in the history
  • Loading branch information
luispadron authored Aug 10, 2024
1 parent 91be02a commit 01ea71d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
6 changes: 5 additions & 1 deletion apple/internal/docc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ def _docc_archive_impl(ctx):

# Add symbol graphs
if symbol_graphs_info:
arguments.add_all("--additional-symbol-graph-dir", symbol_graphs_info.symbol_graphs, expand_directories = False)
arguments.add_all(
symbol_graphs_info.symbol_graphs,
before_each = "--additional-symbol-graph-dir",
expand_directories = False,
)
docc_build_inputs.extend(symbol_graphs_info.symbol_graphs)

# The .docc bundle (if provided, only one is allowed)
Expand Down
15 changes: 12 additions & 3 deletions test/starlark_tests/docc_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def docc_test_suite(name):
"$BUNDLE_ROOT/index.html",
"$BUNDLE_ROOT/documentation/basicframework/readme/index.html",
],
text_file_not_contains = [],
text_test_file = "$BUNDLE_ROOT/metadata.json",
text_test_values = [
"\"bundleDisplayName\":\"BasicFramework\"",
Expand All @@ -78,7 +77,6 @@ def docc_test_suite(name):
"$BUNDLE_ROOT/index.html",
"$BUNDLE_ROOT/documentation/basiclib/readme/index.html",
],
text_file_not_contains = [],
text_test_file = "$BUNDLE_ROOT/metadata.json",
text_test_values = [
"\"bundleDisplayName\":\"BasicLib\"",
Expand All @@ -99,7 +97,6 @@ def docc_test_suite(name):
"$BUNDLE_ROOT/index.html",
"$BUNDLE_ROOT/documentation/basicframework/readme/index.html",
],
text_file_not_contains = [],
text_test_file = "$BUNDLE_ROOT/index.html",
text_test_values = [
"<script defer=\"defer\" src=\"/custom/base/path/js/",
Expand All @@ -108,6 +105,18 @@ def docc_test_suite(name):
tags = [name],
)

# Verifying multiple symbol graph conversion via transitive dependencies.
archive_contents_test(
name = "{}_contains_doccarchive_with_transitive_dependencies".format(name),
build_type = "simulator",
target_under_test = "//test/starlark_tests/targets_under_test/ios:basic_framework_with_transitive_dependency.doccarchive",
contains = [
"$BUNDLE_ROOT/index.html",
"$BUNDLE_ROOT/documentation/transitivedependencytest/index.html",
],
tags = [name],
)

native.test_suite(
name = name,
tags = [name],
Expand Down
8 changes: 8 additions & 0 deletions test/starlark_tests/targets_under_test/ios/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5039,6 +5039,14 @@ docc_archive(
hosting_base_path = "custom/base/path",
)

docc_archive(
name = "basic_framework_with_transitive_dependency.doccarchive",
dep = ":basic_framework_with_transitive_dependency",
fallback_bundle_identifier = "com.google.example.framework",
fallback_bundle_version = "1.0",
fallback_display_name = "BasicFramework",
)

# ---------------------------------------------------------------------------------------
# Target for extension resource bundling.

Expand Down

0 comments on commit 01ea71d

Please sign in to comment.