Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ config = ovr_config

[buildfile]
[not_buildfile] # @oss-enable
name = TARGETS
name_v2 = TARGETS.v2,TARGETS,BUCK.v2,BUCK
2 changes: 1 addition & 1 deletion BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ prelude.filegroup(
prelude.genrule(
name = "copy_android_constraint",
out = "BUCK.v2",
cmd = "cp $(location prelude//android/constraints:files)/TARGETS.v2 $OUT",
cmd = "cp $(location prelude//android/constraints:files)/BUCK.v2 $OUT",
visibility = ["PUBLIC"],
)

Expand Down
6 changes: 3 additions & 3 deletions apple/apple_binary.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ load("@prelude//:paths.bzl", "paths")
load("@prelude//:validation_deps.bzl", "get_validation_deps_outputs")
load("@prelude//apple:apple_stripping.bzl", "apple_strip_args")
load("@prelude//apple:apple_utility.bzl", "get_module_name")
# @oss-disable: load("@prelude//apple/meta_only:linker_outputs.bzl", "get_extra_linker_output_flags", "get_extra_linker_outputs")
# @oss-disable[end= ]: load("@prelude//apple/meta_only:linker_outputs.bzl", "get_extra_linker_output_flags", "get_extra_linker_outputs")
load(
"@prelude//apple/swift:swift_compilation.bzl",
"compile_swift",
Expand Down Expand Up @@ -252,12 +252,12 @@ def apple_binary_impl(ctx: AnalysisContext) -> [list[Provider], Promise]:

def _get_extra_linker_outputs(ctx: AnalysisContext) -> ExtraLinkerOutputs:
_ = ctx # buildifier: disable=unused-variable
# @oss-disable: return get_extra_linker_outputs(ctx)
# @oss-disable[end= ]: return get_extra_linker_outputs(ctx)
return ExtraLinkerOutputs() # @oss-enable

def _get_extra_linker_outputs_flags(ctx: AnalysisContext, outputs: dict[str, Artifact]) -> list[ArgLike]:
_ = ctx # buildifier: disable=unused-variable
# @oss-disable: return get_extra_linker_output_flags(ctx, outputs)
# @oss-disable[end= ]: return get_extra_linker_output_flags(ctx, outputs)
return [] # @oss-enable

def _filter_swift_srcs(ctx: AnalysisContext) -> (list[CxxSrcWithFlags], list[CxxSrcWithFlags]):
Expand Down
6 changes: 3 additions & 3 deletions apple/apple_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ load("@prelude//:validation_deps.bzl", "get_validation_deps_outputs")
load("@prelude//apple:apple_toolchain_types.bzl", "AppleToolchainInfo", "AppleToolsInfo")
load("@prelude//apple:apple_xctest_frameworks_utility.bzl", "get_xctest_frameworks_bundle_parts")
load("@prelude//apple:debug.bzl", "AppleSelectiveDebuggableMetadata")
# @oss-disable: load("@prelude//apple/meta_only:linker_outputs.bzl", "subtargets_for_apple_bundle_extra_outputs")
# @oss-disable[end= ]: load("@prelude//apple/meta_only:linker_outputs.bzl", "subtargets_for_apple_bundle_extra_outputs")
load("@prelude//apple/user:apple_selected_debug_path_file.bzl", "SELECTED_DEBUG_PATH_FILE_NAME")
load("@prelude//apple/user:apple_selective_debugging.bzl", "AppleSelectiveDebuggingInfo")
load("@prelude//apple/validation:debug_artifacts.bzl", "get_debug_artifacts_validators")
Expand Down Expand Up @@ -426,8 +426,8 @@ def apple_bundle_impl(ctx: AnalysisContext) -> list[Provider]:

# Collect extra bundle outputs
extra_output_provider = _extra_output_provider(ctx)
# @oss-disable: extra_output_subtargets = subtargets_for_apple_bundle_extra_outputs(ctx, extra_output_provider)
# @oss-disable: sub_targets.update(extra_output_subtargets)
# @oss-disable[end= ]: extra_output_subtargets = subtargets_for_apple_bundle_extra_outputs(ctx, extra_output_provider)
# @oss-disable[end= ]: sub_targets.update(extra_output_subtargets)

# index store
index_store_subtargets, index_store_info = _index_store_data(ctx)
Expand Down
4 changes: 2 additions & 2 deletions apple/apple_error_handler.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# of this source tree.

load("@prelude//apple:apple_error_handler_types.bzl", "AppleErrorCategories")
# @oss-disable: load("@prelude//apple/meta_only:apple_extra_error_categories.bzl", "APPLE_META_STDERR_ERROR_CATEGORIES")
# @oss-disable[end= ]: load("@prelude//apple/meta_only:apple_extra_error_categories.bzl", "APPLE_META_STDERR_ERROR_CATEGORIES")

_APPLE_STDERR_ERROR_CATEGORIES = [
#codesigning issues
Expand Down Expand Up @@ -58,6 +58,6 @@ def apple_build_error_handler(ctx: ActionErrorCtx) -> list[ActionSubError]:
lowercase_stderr = ctx.stderr.lower()
categories = set()
_add_category_strings(lowercase_stderr, categories, _APPLE_STDERR_ERROR_CATEGORIES)
# @oss-disable: _add_category_strings(lowercase_stderr, categories, APPLE_META_STDERR_ERROR_CATEGORIES)
# @oss-disable[end= ]: _add_category_strings(lowercase_stderr, categories, APPLE_META_STDERR_ERROR_CATEGORIES)

return [ctx.new_sub_error(category = category_string) for category_string in sorted(categories)]
10 changes: 5 additions & 5 deletions apple/apple_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ load("@prelude//apple:apple_dsym.bzl", "DSYM_SUBTARGET", "get_apple_dsym")
load("@prelude//apple:apple_error_handler.bzl", "apple_build_error_handler")
load("@prelude//apple:apple_stripping.bzl", "apple_strip_args")
load("@prelude//apple:apple_toolchain_types.bzl", "AppleToolchainInfo")
# @oss-disable: load("@prelude//apple/meta_only:apple_library_meta_validation.bzl", "apple_library_validate_for_meta_restrictions")
# @oss-disable: load("@prelude//apple/meta_only:linker_outputs.bzl", "get_extra_linker_output_flags", "get_extra_linker_outputs")
# @oss-disable[end= ]: load("@prelude//apple/meta_only:apple_library_meta_validation.bzl", "apple_library_validate_for_meta_restrictions")
# @oss-disable[end= ]: load("@prelude//apple/meta_only:linker_outputs.bzl", "get_extra_linker_output_flags", "get_extra_linker_outputs")
load("@prelude//apple/mockingbird:mockingbird_types.bzl", "MockingbirdLibraryInfo", "MockingbirdLibraryInfoTSet", "MockingbirdLibraryRecord", "MockingbirdSourcesInfo", "MockingbirdTargetType")
load(
"@prelude//apple/swift:swift_compilation.bzl",
Expand Down Expand Up @@ -146,7 +146,7 @@ AppleLibraryForDistributionInfo = provider(
)

def apple_library_impl(ctx: AnalysisContext) -> [Promise, list[Provider]]:
# @oss-disable: apple_library_validate_for_meta_restrictions(ctx)
# @oss-disable[end= ]: apple_library_validate_for_meta_restrictions(ctx)

def get_apple_library_providers(deps_providers) -> list[Provider]:
shared_type = AppleSharedLibraryMachOFileType(ctx.attrs.shared_library_macho_file_type)
Expand Down Expand Up @@ -549,12 +549,12 @@ def apple_library_rule_constructor_params_and_swift_providers(ctx: AnalysisConte

def _get_extra_linker_outputs(ctx: AnalysisContext) -> ExtraLinkerOutputs:
_ = ctx # buildifier: disable=unused-variable
# @oss-disable: return get_extra_linker_outputs(ctx)
# @oss-disable[end= ]: return get_extra_linker_outputs(ctx)
return ExtraLinkerOutputs() # @oss-enable

def _get_extra_linker_outputs_flags(ctx: AnalysisContext, outputs: dict[str, Artifact]) -> list[ArgLike]:
_ = ctx # buildifier: disable=unused-variable
# @oss-disable: return get_extra_linker_output_flags(ctx, outputs)
# @oss-disable[end= ]: return get_extra_linker_output_flags(ctx, outputs)
return [] # @oss-enable

def _filter_swift_srcs(ctx: AnalysisContext, additional_srcs: list = []) -> (list[CxxSrcWithFlags], list[CxxSrcWithFlags]):
Expand Down
12 changes: 6 additions & 6 deletions apple/apple_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ load(
load("@prelude//apple:apple_library.bzl", "AppleLibraryAdditionalParams", "apple_library_rule_constructor_params_and_swift_providers")
load("@prelude//apple:apple_toolchain_types.bzl", "AppleToolchainInfo")
load("@prelude//apple:apple_xctest_frameworks_utility.bzl", "get_xctest_frameworks_bundle_parts")
# @oss-disable: load("@prelude//apple/meta_only:apple_test_re_capabilities.bzl", "ios_test_re_capabilities", "macos_test_re_capabilities")
# @oss-disable: load("@prelude//apple/meta_only:apple_test_re_use_case.bzl", "apple_test_re_use_case")
# @oss-disable[end= ]: load("@prelude//apple/meta_only:apple_test_re_capabilities.bzl", "ios_test_re_capabilities", "macos_test_re_capabilities")
# @oss-disable[end= ]: load("@prelude//apple/meta_only:apple_test_re_use_case.bzl", "apple_test_re_use_case")
load("@prelude//apple/swift:swift_compilation.bzl", "get_swift_anonymous_targets", "uses_explicit_modules")
load(
"@prelude//cxx:argsfiles.bzl",
Expand Down Expand Up @@ -235,15 +235,15 @@ def _get_test_info(ctx: AnalysisContext, xctest_bundle: Artifact, test_host_app_
remote_execution_properties = ctx.attrs.test_re_capabilities

elif sdk_name == MacOSXSdkMetadata.name:
# @oss-disable: remote_execution_properties = macos_test_re_capabilities()
# @oss-disable[end= ]: remote_execution_properties = macos_test_re_capabilities()
remote_execution_properties = None # @oss-enable

else:
# @oss-disable: requires_ios_booted_simulator = ctx.attrs.test_host_app != None or ctx.attrs.ui_test_target_app != None
# @oss-disable: remote_execution_properties = ios_test_re_capabilities(use_unbooted_simulator = not requires_ios_booted_simulator)
# @oss-disable[end= ]: requires_ios_booted_simulator = ctx.attrs.test_host_app != None or ctx.attrs.ui_test_target_app != None
# @oss-disable[end= ]: remote_execution_properties = ios_test_re_capabilities(use_unbooted_simulator = not requires_ios_booted_simulator)
remote_execution_properties = None # @oss-enable

# @oss-disable: remote_execution_use_case = ctx.attrs.test_re_use_case or apple_test_re_use_case(macos_test = sdk_name == MacOSXSdkMetadata.name)
# @oss-disable[end= ]: remote_execution_use_case = ctx.attrs.test_re_use_case or apple_test_re_use_case(macos_test = sdk_name == MacOSXSdkMetadata.name)

remote_execution_use_case = None # @oss-enable
local_enabled = remote_execution_use_case == None
Expand Down
2 changes: 1 addition & 1 deletion apple/swift/swift_compilation.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ SwiftDebugInfo = record(

_IS_USER_BUILD = True # @oss-enable
# @oss-disable: # To determine whether we're running on CI or not, we expect user.sandcastle_alias to be set.
# @oss-disable: _IS_USER_BUILD = (read_root_config("user", "sandcastle_alias", None) == None)
# @oss-disable[end= ]: _IS_USER_BUILD = (read_root_config("user", "sandcastle_alias", None) == None)

_REQUIRED_SDK_MODULES = ["Swift", "SwiftOnoneSupport", "Darwin", "_Concurrency", "_StringProcessing"]

Expand Down
2 changes: 1 addition & 1 deletion apple/tools/BUCK.v2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source_listing()
apple_tools(
name = "apple-tools",
adhoc_codesign_tool = None, # @oss-enable
# @oss-disable: adhoc_codesign_tool = "prelude//apple/tools/meta_only/codesign_rust:adhoc-signer",
# @oss-disable[end= ]: adhoc_codesign_tool = "prelude//apple/tools/meta_only/codesign_rust:adhoc-signer",
assemble_bundle = "prelude//apple/tools/bundling:assemble_bundle",
dry_codesign_tool = ":dry_codesign_tool",
framework_sanitizer = ":framework_sanitizer",
Expand Down
4 changes: 2 additions & 2 deletions apple/tools/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

# @oss-disable: load("@fbsource//tools/build_defs:python_platform.bzl", "set_platform_decorator_for_python")
# @oss-disable[end= ]: load("@fbsource//tools/build_defs:python_platform.bzl", "set_platform_decorator_for_python")
load("@prelude//:is_full_meta_repo.bzl", "is_full_meta_repo")
load("@prelude//:native.bzl", _native = "native")

Expand All @@ -14,7 +14,7 @@ set_platform_decorator_for_python = lambda **kwargs: kwargs # @oss-enable
def meta_python_test(name, **kwargs):
# Set the platform attributes as needed for proper exec platform resolution
kwargs = set_platform_decorator_for_python(
# @oss-disable: set_python_constraint_overrides = True,
# @oss-disable[end= ]: set_python_constraint_overrides = True,
**kwargs
)

Expand Down
4 changes: 2 additions & 2 deletions ide_integrations/xcode/argsfiles.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

# @oss-disable: load("@prelude//apple/meta_only:xcode_argsfiles.bzl", "get_meta_specific_xcode_arg_substitutions")
# @oss-disable[end= ]: load("@prelude//apple/meta_only:xcode_argsfiles.bzl", "get_meta_specific_xcode_arg_substitutions")

def _get_meta_specific_xcode_arg_substitutions():
# @oss-disable: return get_meta_specific_xcode_arg_substitutions()
# @oss-disable[end= ]: return get_meta_specific_xcode_arg_substitutions()
return [] # @oss-enable

XCODE_ARGSFILES_SUB_TARGET = "xcode-argsfiles"
Expand Down
3 changes: 1 addition & 2 deletions platforms/BUCK.v2
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ prelude.constraint_value(
# execution configuration, but that's not implemented yet.
export_file(
name = "fat_platform_incompatible",
src = "BUCK.v2", # @oss-enable
# @oss-disable: src = "TARGETS.v2",
src = "BUCK.v2",
target_compatible_with = select({
":fat_platform_enabled": ["config//:none"],
"DEFAULT": [],
Expand Down
4 changes: 2 additions & 2 deletions platforms/apple/base.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ load(

# Debug constraints to add for build modes used by other rule platforms (ex: rust).
_DEBUG_CONSTRAINTS = [
# @oss-disable: "ovr_config//build_mode/constraints:debug",
# @oss-disable[end= ]: "ovr_config//build_mode/constraints:debug",
]

# Release constraints to add for build modes used by other rule platforms (ex: rust).
_RELEASE_CONSTRAINTS = [
# @oss-disable: "ovr_config//build_mode/constraints:release",
# @oss-disable[end= ]: "ovr_config//build_mode/constraints:release",
]

BUILD_MODE_TO_CONSTRAINTS_MAP = {
Expand Down
14 changes: 7 additions & 7 deletions platforms/apple/build_mode.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

# @oss-disable: load("@prelude//platforms/apple/meta_only:build_mode.bzl", _APPLE_BUILD_MODES = "APPLE_BUILD_MODES", _BUILD_MODE = "BUILD_MODE", _get_build_mode = "get_build_mode", _get_build_mode_debug = "get_build_mode_debug", _get_build_mode_release = "get_build_mode_release")
# @oss-disable[end= ]: load("@prelude//platforms/apple/meta_only:build_mode.bzl", _APPLE_BUILD_MODES = "APPLE_BUILD_MODES", _BUILD_MODE = "BUILD_MODE", _get_build_mode = "get_build_mode", _get_build_mode_debug = "get_build_mode_debug", _get_build_mode_release = "get_build_mode_release")

BUILD_MODE_DEBUG = "debug" # @oss-enable
BUILD_MODE_PROFILE = "profile" # @oss-enable
BUILD_MODE_RELEASE = "release" # @oss-enable

APPLE_BUILD_MODES = [BUILD_MODE_DEBUG, BUILD_MODE_PROFILE, BUILD_MODE_RELEASE] # @oss-enable
# @oss-disable: APPLE_BUILD_MODES = _APPLE_BUILD_MODES
# @oss-disable[end= ]: APPLE_BUILD_MODES = _APPLE_BUILD_MODES

BUILD_MODE = struct( # @oss-enable
DEBUG = BUILD_MODE_DEBUG, # @oss-enable
PROFILE = BUILD_MODE_PROFILE, # @oss-enable
RELEASE = BUILD_MODE_RELEASE, # @oss-enable
) # @oss-enable
# @oss-disable: BUILD_MODE = _BUILD_MODE
# @oss-disable[end= ]: BUILD_MODE = _BUILD_MODE

CONSTRAINT_PACKAGE = "prelude//platforms/apple/constraints" # @oss-enable
# @oss-disable: CONSTRAINT_PACKAGE = "ovr_config//build_mode/apple/constraints"
# @oss-disable[end= ]: CONSTRAINT_PACKAGE = "ovr_config//build_mode/apple/constraints"

def get_build_mode():
return read_root_config("apple", "build_mode", BUILD_MODE_DEBUG) # @oss-enable
# @oss-disable: return _get_build_mode()
# @oss-disable[end= ]: return _get_build_mode()

def get_build_mode_debug():
return BUILD_MODE.DEBUG # @oss-enable
# @oss-disable: return _get_build_mode_debug()
# @oss-disable[end= ]: return _get_build_mode_debug()

def get_build_mode_release():
return BUILD_MODE.RELEASE # @oss-enable
# @oss-disable: return _get_build_mode_release()
# @oss-disable[end= ]: return _get_build_mode_release()
6 changes: 3 additions & 3 deletions platforms/apple/platforms_map.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# License, Version 2.0 found in the LICENSE-APACHE file in the root directory
# of this source tree.

# @oss-disable: load("@prelude//platforms/apple/meta_only:platforms_map.bzl", _APPLE_PLATFORMS_MAP = "APPLE_PLATFORMS_MAP", _APPLE_SDK_DEFAULT_PLATFORM_MAP = "APPLE_SDK_DEFAULT_PLATFORM_MAP")
# @oss-disable[end= ]: load("@prelude//platforms/apple/meta_only:platforms_map.bzl", _APPLE_PLATFORMS_MAP = "APPLE_PLATFORMS_MAP", _APPLE_SDK_DEFAULT_PLATFORM_MAP = "APPLE_SDK_DEFAULT_PLATFORM_MAP")

APPLE_PLATFORMS_MAP = {} # TODO: Define OSS platforms map # @oss-enable
# @oss-disable: APPLE_PLATFORMS_MAP = _APPLE_PLATFORMS_MAP
# @oss-disable[end= ]: APPLE_PLATFORMS_MAP = _APPLE_PLATFORMS_MAP

APPLE_SDK_DEFAULT_PLATFORM_MAP = {} # @oss-enable
# @oss-disable: APPLE_SDK_DEFAULT_PLATFORM_MAP = _APPLE_SDK_DEFAULT_PLATFORM_MAP
# @oss-disable[end= ]: APPLE_SDK_DEFAULT_PLATFORM_MAP = _APPLE_SDK_DEFAULT_PLATFORM_MAP
5 changes: 0 additions & 5 deletions python/tools/make_par/BUCK
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# META INTERNAL NOTES:
# If this file is changed open source it will probably not import correctly,
# as it is the only `TARGETS` (not `TARGETS.v2`) in the prelude.
# Configuring the tools to do it right seemed more dangerous than just having a caveat on this one file.

load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")
Expand Down
2 changes: 1 addition & 1 deletion rust/linkable_symbol.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ applies to all of the following situations:

load("@prelude//rust:link_info.bzl", "RustLinkInfo") # @oss-enable
load("@prelude//prelude.bzl", prelude = "native") # @oss-enable
# @oss-disable: load("@fbcode//buck2/facebook:autodeps_hacks.bzl", "RustLinkInfo", "prelude")
# @oss-disable[end= ]: load("@fbcode//buck2/facebook:autodeps_hacks.bzl", "RustLinkInfo", "prelude")

def _remove_rust_link_info_impl(ctx: AnalysisContext) -> list[Provider]:
out = []
Expand Down