Skip to content

Commit

Permalink
Make AppleDebugInfo and AppleSymbolsFileInfo available from outside o…
Browse files Browse the repository at this point in the history
…f rules_apple (bazelbuild#2558)
  • Loading branch information
vakhidbetrakhmadov committed Oct 18, 2024
1 parent 2e45cef commit 2319622
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
15 changes: 6 additions & 9 deletions apple/internal/partials/apple_symbols_file.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ load(
"@build_bazel_rules_apple//apple/internal:processor.bzl",
"processor",
)

_AppleSymbolsFileInfo = provider(
doc = "Private provider to propagate the transitive .symbols `File`s.",
fields = {
"symbols_output_dirs": "Depset of `File`s containing directories of $UUID.symbols files for transitive dependencies.",
},
load(
"@build_bazel_rules_apple//apple/internal/providers:apple_symbols_file_info.bzl",
"AppleSymbolsFileInfo",
)

def _apple_symbols_file_partial_impl(
Expand Down Expand Up @@ -89,9 +86,9 @@ def _apple_symbols_file_partial_impl(
transitive_output_files = depset(
direct = outputs,
transitive = [
x[_AppleSymbolsFileInfo].symbols_output_dirs
x[AppleSymbolsFileInfo].symbols_output_dirs
for x in dependency_targets
if _AppleSymbolsFileInfo in x
if AppleSymbolsFileInfo in x
],
)

Expand All @@ -102,7 +99,7 @@ def _apple_symbols_file_partial_impl(

return struct(
bundle_files = bundle_files,
providers = [_AppleSymbolsFileInfo(symbols_output_dirs = transitive_output_files)],
providers = [AppleSymbolsFileInfo(symbols_output_dirs = transitive_output_files)],
)

def apple_symbols_file_partial(
Expand Down
2 changes: 0 additions & 2 deletions apple/internal/providers/apple_debug_info.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

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

visibility("//apple/internal/...")

AppleDebugInfo = provider(
doc = """
Private provider to propagate transitive dSYM and link maps information used by the debug symbols
Expand Down
22 changes: 22 additions & 0 deletions apple/internal/providers/apple_symbols_file_info.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2023 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""AppleSymbolsFileInfo provider implementation for transitive .symbols `File`s propagation."""

AppleSymbolsFileInfo = provider(
doc = "Private provider to propagate the transitive .symbols `File`s.",
fields = {
"symbols_output_dirs": "Depset of `File`s containing directories of $UUID.symbols files for transitive dependencies.",
},
)

0 comments on commit 2319622

Please sign in to comment.