Skip to content

Commit 2319622

Browse files
Make AppleDebugInfo and AppleSymbolsFileInfo available from outside of rules_apple (#2558)
1 parent 2e45cef commit 2319622

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

apple/internal/partials/apple_symbols_file.bzl

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,9 @@ load(
3535
"@build_bazel_rules_apple//apple/internal:processor.bzl",
3636
"processor",
3737
)
38-
39-
_AppleSymbolsFileInfo = provider(
40-
doc = "Private provider to propagate the transitive .symbols `File`s.",
41-
fields = {
42-
"symbols_output_dirs": "Depset of `File`s containing directories of $UUID.symbols files for transitive dependencies.",
43-
},
38+
load(
39+
"@build_bazel_rules_apple//apple/internal/providers:apple_symbols_file_info.bzl",
40+
"AppleSymbolsFileInfo",
4441
)
4542

4643
def _apple_symbols_file_partial_impl(
@@ -89,9 +86,9 @@ def _apple_symbols_file_partial_impl(
8986
transitive_output_files = depset(
9087
direct = outputs,
9188
transitive = [
92-
x[_AppleSymbolsFileInfo].symbols_output_dirs
89+
x[AppleSymbolsFileInfo].symbols_output_dirs
9390
for x in dependency_targets
94-
if _AppleSymbolsFileInfo in x
91+
if AppleSymbolsFileInfo in x
9592
],
9693
)
9794

@@ -102,7 +99,7 @@ def _apple_symbols_file_partial_impl(
10299

103100
return struct(
104101
bundle_files = bundle_files,
105-
providers = [_AppleSymbolsFileInfo(symbols_output_dirs = transitive_output_files)],
102+
providers = [AppleSymbolsFileInfo(symbols_output_dirs = transitive_output_files)],
106103
)
107104

108105
def apple_symbols_file_partial(

apple/internal/providers/apple_debug_info.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
"""AppleDebugInfo provider implementation for resource aspect and debug symbols partial support."""
1616

17-
visibility("//apple/internal/...")
18-
1917
AppleDebugInfo = provider(
2018
doc = """
2119
Private provider to propagate transitive dSYM and link maps information used by the debug symbols
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2023 The Bazel Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""AppleSymbolsFileInfo provider implementation for transitive .symbols `File`s propagation."""
16+
17+
AppleSymbolsFileInfo = provider(
18+
doc = "Private provider to propagate the transitive .symbols `File`s.",
19+
fields = {
20+
"symbols_output_dirs": "Depset of `File`s containing directories of $UUID.symbols files for transitive dependencies.",
21+
},
22+
)

0 commit comments

Comments
 (0)