diff --git a/apple/internal/partials/apple_symbols_file.bzl b/apple/internal/partials/apple_symbols_file.bzl index 59b71ab1d2..3538d3926a 100644 --- a/apple/internal/partials/apple_symbols_file.bzl +++ b/apple/internal/partials/apple_symbols_file.bzl @@ -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( @@ -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 ], ) @@ -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( diff --git a/apple/internal/providers/apple_debug_info.bzl b/apple/internal/providers/apple_debug_info.bzl index d5c0f9df8e..0a2761c693 100644 --- a/apple/internal/providers/apple_debug_info.bzl +++ b/apple/internal/providers/apple_debug_info.bzl @@ -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 diff --git a/apple/internal/providers/apple_symbols_file_info.bzl b/apple/internal/providers/apple_symbols_file_info.bzl new file mode 100644 index 0000000000..a9def50f73 --- /dev/null +++ b/apple/internal/providers/apple_symbols_file_info.bzl @@ -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.", + }, +)