├── apple
├── tools
│ ├── empty.c
│ ├── bundling
│ │ └── test_resources
│ │ │ ├── the.broken_json
│ │ │ ├── newer_version_action_metadata.json
│ │ │ ├── newer_version_incremental_state.json
│ │ │ └── valid_action_metadata.json
│ ├── selective_debugging
│ │ ├── test_resources
│ │ │ ├── focused_targets_empty.json
│ │ │ ├── focused_targets.json
│ │ │ ├── HelloWorld
│ │ │ ├── focused_spec_regex_all.json
│ │ │ ├── focused_spec.json
│ │ │ └── focused_spec_regex_none.json
│ │ └── utils.py
│ ├── code_signing_using_manifest
│ │ ├── BUCK
│ │ └── code_signing.dotslash.py
│ ├── codesign_manifest_tree_postprocessor
│ │ └── BUCK
│ ├── signing_context_tree_postprocessor
│ │ └── BUCK
│ ├── code_signing
│ │ ├── test_resources
│ │ │ ├── test2.plist
│ │ │ ├── test1.plist
│ │ │ └── test3.plist
│ │ └── dummy_binary_for_signing.c
│ ├── re_compatibility_utils
│ │ └── BUCK
│ └── resource_broker
│ │ ├── timeouts.py
│ │ └── BUCK
├── apple_platforms.bzl
├── scene_kit_assets_types.bzl
├── apple_core_data_types.bzl
├── arch.bzl
├── apple_resource_dedupe_alias.bzl
├── user
│ ├── apple_selected_debug_path_file.bzl
│ ├── apple_macos_bundle.bzl
│ └── apple_watchos_bundle.bzl
├── apple_swift_stdlib.bzl
├── apple_app_intents.bzl
├── apple_package_config.bzl
├── apple_sdk.bzl
├── apple_stripping.bzl
├── apple_modular_utility.bzl
├── apple_package_types.bzl
├── apple_resource_utility.bzl
├── swift
│ └── swift_sdk_flags.bzl
├── apple_rules_impl.bzl
└── apple_library_types.bzl
├── cxx
├── dist_lto
│ └── tools
│ │ ├── __init__.py
│ │ └── dist_lto_copy.py
├── gcno.bzl
└── platform.bzl
├── python
├── sourcedb
│ └── tests
│ │ └── test_files
│ │ ├── my_extension.py
│ │ ├── my_extension.cpp
│ │ ├── my_extension.pyi
│ │ ├── alias.py
│ │ ├── lib.py
│ │ ├── main.py
│ │ └── subdir
│ │ ├── util.py
│ │ ├── util.pyi
│ │ ├── __init__.py
│ │ └── __init__.pyi
├── runtime
│ └── BUCK
└── tools
│ ├── sourcedb_merger
│ └── tests
│ │ └── main.sh
│ └── fail_with_message.py
├── CHANGELOG.md
├── go_bootstrap
└── tools
│ ├── go.mod
│ ├── README.md
│ └── BUCK
├── toolchains
├── android
│ ├── src
│ │ └── com
│ │ │ └── facebook
│ │ │ └── buck
│ │ │ ├── jvm
│ │ │ ├── java
│ │ │ │ ├── plugin
│ │ │ │ │ ├── javac-plugin.jar
│ │ │ │ │ ├── api
│ │ │ │ │ │ ├── BUCK
│ │ │ │ │ │ ├── PluginClassLoaderFactory.java
│ │ │ │ │ │ └── PluginClassLoader.java
│ │ │ │ │ └── adapter
│ │ │ │ │ │ └── BuckJavacPlugin.java
│ │ │ │ ├── javax
│ │ │ │ │ └── BUCK
│ │ │ │ ├── abi
│ │ │ │ │ └── source
│ │ │ │ │ │ ├── api
│ │ │ │ │ │ ├── StopCompilation.java
│ │ │ │ │ │ ├── BUCK
│ │ │ │ │ │ └── SourceCodeWillNotCompileException.java
│ │ │ │ │ │ ├── ArtificialAnnotationValue.java
│ │ │ │ │ │ ├── ArtificialQualifiedNameable.java
│ │ │ │ │ │ ├── ArtificialAnnotationMirror.java
│ │ │ │ │ │ ├── ArtificialPackageElement.java
│ │ │ │ │ │ └── CompletedTypeKind.java
│ │ │ │ ├── FileManagerListener.java
│ │ │ │ ├── classes
│ │ │ │ │ ├── ClasspathTraverser.java
│ │ │ │ │ ├── AbstractFileLike.java
│ │ │ │ │ └── DefaultClasspathTraverser.java
│ │ │ │ ├── version
│ │ │ │ │ └── utils
│ │ │ │ │ │ └── BUCK
│ │ │ │ ├── OptionsConsumer.java
│ │ │ │ ├── JavacVersion.java
│ │ │ │ └── stepsbuilder
│ │ │ │ │ └── javacd
│ │ │ │ │ └── worker
│ │ │ │ │ └── BUCK
│ │ │ ├── kotlin
│ │ │ │ ├── plugin
│ │ │ │ │ ├── dep-tracker.jar
│ │ │ │ │ └── BUCK
│ │ │ │ ├── compilerplugins
│ │ │ │ │ ├── kosabi
│ │ │ │ │ │ ├── k2-jvm-abi-gen
│ │ │ │ │ │ │ └── resources
│ │ │ │ │ │ │ │ └── META-INF
│ │ │ │ │ │ │ │ └── services
│ │ │ │ │ │ │ │ ├── org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
│ │ │ │ │ │ │ │ └── org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar
│ │ │ │ │ │ ├── stubsgen
│ │ │ │ │ │ │ ├── plugin
│ │ │ │ │ │ │ │ ├── stubsgen
│ │ │ │ │ │ │ │ │ └── resources
│ │ │ │ │ │ │ │ │ │ └── META-INF
│ │ │ │ │ │ │ │ │ │ └── services
│ │ │ │ │ │ │ │ │ │ ├── org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
│ │ │ │ │ │ │ │ │ │ └── org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
│ │ │ │ │ │ │ │ ├── stubsgen_k2
│ │ │ │ │ │ │ │ │ └── resources
│ │ │ │ │ │ │ │ │ │ └── META-INF
│ │ │ │ │ │ │ │ │ │ └── services
│ │ │ │ │ │ │ │ │ │ ├── org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
│ │ │ │ │ │ │ │ │ │ └── org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar
│ │ │ │ │ │ │ │ └── source_modifier
│ │ │ │ │ │ │ │ │ └── resources
│ │ │ │ │ │ │ │ │ └── META-INF
│ │ │ │ │ │ │ │ │ └── services
│ │ │ │ │ │ │ │ │ ├── org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar
│ │ │ │ │ │ │ │ │ └── org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor
│ │ │ │ │ │ │ ├── standalone
│ │ │ │ │ │ │ │ └── KosabiConfig.kt
│ │ │ │ │ │ │ └── util
│ │ │ │ │ │ │ │ └── FTQCollection.kt
│ │ │ │ │ │ └── common
│ │ │ │ │ │ │ ├── BUCK
│ │ │ │ │ │ │ └── stub
│ │ │ │ │ │ │ ├── model
│ │ │ │ │ │ │ ├── Type.kt
│ │ │ │ │ │ │ └── KPropertyStub.kt
│ │ │ │ │ │ │ └── BUCK
│ │ │ │ │ ├── usedclasses
│ │ │ │ │ │ └── BUCK
│ │ │ │ │ └── common
│ │ │ │ │ │ └── BUCK
│ │ │ │ ├── abtesting
│ │ │ │ │ ├── noop
│ │ │ │ │ │ ├── resources
│ │ │ │ │ │ │ └── META-INF
│ │ │ │ │ │ │ │ └── services
│ │ │ │ │ │ │ │ └── com.facebook.buck.jvm.kotlin.abtesting.ExperimentConfigService
│ │ │ │ │ │ ├── BUCK
│ │ │ │ │ │ └── NoopExperimentConfigService.kt
│ │ │ │ │ ├── ksic
│ │ │ │ │ │ ├── BUCK
│ │ │ │ │ │ └── KsicExperimentConstants.kt
│ │ │ │ │ ├── BUCK
│ │ │ │ │ └── ExperimentConfig.kt
│ │ │ │ ├── cd
│ │ │ │ │ └── analytics
│ │ │ │ │ │ ├── logger
│ │ │ │ │ │ ├── noop
│ │ │ │ │ │ │ ├── resources
│ │ │ │ │ │ │ │ └── META-INF
│ │ │ │ │ │ │ │ │ └── services
│ │ │ │ │ │ │ │ │ └── com.facebook.buck.jvm.kotlin.cd.analytics.logger.KotlinCDLogger
│ │ │ │ │ │ │ └── BUCK
│ │ │ │ │ │ └── model
│ │ │ │ │ │ │ └── BUCK
│ │ │ │ │ │ └── BUCK
│ │ │ │ ├── ksp
│ │ │ │ │ └── incremental
│ │ │ │ │ │ ├── ReprocessReason.kt
│ │ │ │ │ │ └── BUCK
│ │ │ │ ├── kotlinc
│ │ │ │ │ └── incremental
│ │ │ │ │ │ └── BUCK
│ │ │ │ └── buildtools
│ │ │ │ │ └── SharedApiClassesClassLoaderProvider.kt
│ │ │ └── cd
│ │ │ │ ├── CompileStepsBuilder.java
│ │ │ │ ├── BuildCommandStepsBuilder.java
│ │ │ │ ├── serialization
│ │ │ │ ├── SerializationUtil.java
│ │ │ │ └── PathSerializer.java
│ │ │ │ └── CompileStepsBuilderFactory.java
│ │ │ ├── testrunner
│ │ │ └── META-INF
│ │ │ │ └── services
│ │ │ │ └── org.junit.jupiter.api.extension.Extension
│ │ │ ├── util
│ │ │ ├── zip
│ │ │ │ ├── CustomZipEntryWithPath.kt
│ │ │ │ ├── ZipCompressionLevel.java
│ │ │ │ ├── collect
│ │ │ │ │ └── OnDuplicateEntry.java
│ │ │ │ └── BestCompressionGZIPOutputStream.java
│ │ │ ├── io
│ │ │ │ └── BUCK
│ │ │ ├── function
│ │ │ │ └── BUCK
│ │ │ ├── liteinfersupport
│ │ │ │ ├── PropagatesNullable.java
│ │ │ │ └── Nullable.java
│ │ │ ├── unit
│ │ │ │ └── BUCK
│ │ │ ├── xml
│ │ │ │ └── BUCK
│ │ │ ├── relativepathmap
│ │ │ │ └── BUCK
│ │ │ ├── perf
│ │ │ │ └── BUCK
│ │ │ └── nio
│ │ │ │ └── BUCK
│ │ │ ├── android
│ │ │ ├── device
│ │ │ │ └── BUCK
│ │ │ ├── zipalign
│ │ │ │ └── BUCK
│ │ │ ├── apk
│ │ │ │ └── sdk
│ │ │ │ │ └── BUCK
│ │ │ ├── proguard
│ │ │ │ └── BUCK
│ │ │ ├── apkmodule
│ │ │ │ ├── HasBuildTargetAndBuildDeps.java
│ │ │ │ └── TargetGraphInterface.java
│ │ │ └── AndroidInstallPrinter.java
│ │ │ ├── io
│ │ │ ├── windowsfs
│ │ │ │ └── BUCK
│ │ │ ├── pathformat
│ │ │ │ └── BUCK
│ │ │ ├── filesystem
│ │ │ │ ├── BUCK
│ │ │ │ └── impl
│ │ │ │ │ └── BUCK
│ │ │ └── file
│ │ │ │ └── PathMatcher.java
│ │ │ ├── installer
│ │ │ ├── common
│ │ │ │ └── BUCK
│ │ │ ├── BUCK
│ │ │ └── proto
│ │ │ │ └── BUCK
│ │ │ ├── core
│ │ │ ├── util
│ │ │ │ └── log
│ │ │ │ │ ├── BUCK
│ │ │ │ │ └── appendablelogrecord
│ │ │ │ │ └── BUCK
│ │ │ ├── filesystems
│ │ │ │ ├── BUCK
│ │ │ │ └── AbsPathImpl.java
│ │ │ └── build
│ │ │ │ └── execution
│ │ │ │ └── context
│ │ │ │ └── BUCK
│ │ │ ├── step
│ │ │ └── BUCK
│ │ │ ├── workertool
│ │ │ └── resources
│ │ │ │ └── proto
│ │ │ │ └── BUCK
│ │ │ └── test
│ │ │ ├── selectors
│ │ │ ├── Nullable.java
│ │ │ ├── TestSelectorParseException.java
│ │ │ └── BUCK
│ │ │ └── result
│ │ │ └── type
│ │ │ └── BUCK
│ ├── test
│ │ └── com
│ │ │ └── facebook
│ │ │ └── buck
│ │ │ ├── util
│ │ │ ├── zip
│ │ │ │ ├── collect
│ │ │ │ │ ├── testdata
│ │ │ │ │ │ └── zip-collector
│ │ │ │ │ │ │ ├── tree.txt
│ │ │ │ │ │ │ ├── zip-1.zip
│ │ │ │ │ │ │ └── zip-2.zip
│ │ │ │ │ └── BUCK
│ │ │ │ ├── aligned.4.zip
│ │ │ │ ├── aligned.page.zip
│ │ │ │ ├── sample-bytes.dat
│ │ │ │ └── aligned.4.no_extra.zip
│ │ │ ├── unarchive
│ │ │ │ └── testdata
│ │ │ │ │ ├── output.tar
│ │ │ │ │ ├── output.tar.bz2
│ │ │ │ │ ├── output.tar.gz
│ │ │ │ │ └── output.tar.xz
│ │ │ ├── xml
│ │ │ │ └── testdata
│ │ │ │ │ └── sample.xml
│ │ │ ├── json
│ │ │ │ └── BUCK
│ │ │ ├── unit
│ │ │ │ └── BUCK
│ │ │ ├── nio
│ │ │ │ └── BUCK
│ │ │ └── environment
│ │ │ │ └── BUCK
│ │ │ ├── android
│ │ │ ├── aapt
│ │ │ │ └── testdata
│ │ │ │ │ └── android_project
│ │ │ │ │ ├── sample_res
│ │ │ │ │ ├── drawable
│ │ │ │ │ │ └── icon.png
│ │ │ │ │ ├── drawable-ldpi
│ │ │ │ │ │ └── nine_patch.9.png
│ │ │ │ │ └── transition-v19
│ │ │ │ │ │ └── some_transition.xml
│ │ │ │ │ ├── sample_resources_invalid_item.xml
│ │ │ │ │ ├── sample_resources_missing_name_attr.xml
│ │ │ │ │ ├── sample_resources_invalid_resource_type.xml
│ │ │ │ │ ├── sample_resources_4.xml
│ │ │ │ │ ├── sample_resources_3.xml
│ │ │ │ │ ├── sample_resources_invalid_node_id.xml
│ │ │ │ │ ├── sample_resources_invalid_definition.xml
│ │ │ │ │ ├── sample_resources_android_drawables.xml
│ │ │ │ │ ├── sample_resources_invalid_reference.xml
│ │ │ │ │ ├── sample_resources_custom_drawables.xml
│ │ │ │ │ └── sample_resources_1.xml
│ │ │ ├── resources
│ │ │ │ ├── testdata
│ │ │ │ │ └── aapt_dump
│ │ │ │ │ │ ├── example.apk
│ │ │ │ │ │ ├── row_with_button.xml
│ │ │ │ │ │ └── example.apk.strings
│ │ │ │ ├── strings
│ │ │ │ │ └── BUCK
│ │ │ │ └── filter
│ │ │ │ │ └── BUCK
│ │ │ ├── dex
│ │ │ │ └── BUCK
│ │ │ ├── apkmodule
│ │ │ │ └── BUCK
│ │ │ ├── manifest
│ │ │ │ └── BUCK
│ │ │ ├── proguard
│ │ │ │ └── BUCK
│ │ │ └── build_config
│ │ │ │ └── BUCK
│ │ │ ├── jvm
│ │ │ ├── java
│ │ │ │ ├── testdata
│ │ │ │ │ └── prebuilt
│ │ │ │ │ │ ├── tiny.jar
│ │ │ │ │ │ ├── junit.jar
│ │ │ │ │ │ └── PrebuiltJunitMain.java
│ │ │ │ ├── abi
│ │ │ │ │ ├── testdata
│ │ │ │ │ │ ├── sample
│ │ │ │ │ │ │ ├── junit.jar
│ │ │ │ │ │ │ ├── unity.jar
│ │ │ │ │ │ │ └── android.jar
│ │ │ │ │ │ └── descriptor_and_signature_factories
│ │ │ │ │ │ │ ├── DependencyInterface.java
│ │ │ │ │ │ │ ├── DependencyException.java
│ │ │ │ │ │ │ └── Dependency.java
│ │ │ │ │ └── source
│ │ │ │ │ │ └── AnnotationWithSingleClassForTreeBackedTest.java
│ │ │ │ ├── plugin
│ │ │ │ │ └── adapter
│ │ │ │ │ │ └── TestTaskListener.java
│ │ │ │ └── runner
│ │ │ │ │ └── BUCK
│ │ │ ├── cd
│ │ │ │ └── BUCK
│ │ │ └── kotlin
│ │ │ │ └── compilerplugins
│ │ │ │ └── usedclasses
│ │ │ │ └── BUCK
│ │ │ ├── ddplist
│ │ │ ├── BUCK
│ │ │ └── test-files
│ │ │ │ └── test1.plist
│ │ │ ├── core
│ │ │ └── util
│ │ │ │ └── graph
│ │ │ │ └── BUCK
│ │ │ ├── io
│ │ │ └── pathformat
│ │ │ │ └── BUCK
│ │ │ ├── zip
│ │ │ └── BUCK
│ │ │ ├── testresultsoutput
│ │ │ └── BUCK
│ │ │ └── cli
│ │ │ └── bootstrapper
│ │ │ └── BUCK
│ ├── BUCK
│ ├── third-party
│ │ └── aosp
│ │ │ ├── METADATA.bzl
│ │ │ ├── tools-targetApi.patch
│ │ │ └── SignedJarBuilder.patch
│ ├── android
│ │ └── com
│ │ │ └── facebook
│ │ │ └── buck
│ │ │ └── android
│ │ │ └── support
│ │ │ └── exopackage
│ │ │ └── BUCK
│ ├── tools
│ │ └── build_rules
│ │ │ └── fb_native.bzl
│ └── meta_only
│ │ └── src
│ │ └── com
│ │ └── facebook
│ │ └── buck
│ │ └── jvm
│ │ └── kotlin
│ │ └── abtesting
│ │ └── BUCK
├── apple
│ └── xcode_version_checker
│ │ ├── .gitignore
│ │ ├── xcode_version_checker
│ │ ├── BUCK
│ │ ├── README
│ │ └── test
│ │ └── Xcode_14.2.0_14C18_fb_version.plist
├── cxx
│ └── clang
│ │ └── BUCK
├── msvc
│ └── BUCK
├── execution_host.bzl
├── no_toolchain.bzl
└── genrule.bzl
├── .gitignore
├── haskell
├── ide
│ ├── hie.yaml
│ └── README.md
├── tools
│ └── BUCK
└── haskell_ide.bzl
├── ide_integrations
├── visual_studio
│ ├── assets
│ │ ├── demo.png
│ │ └── how-it-works.png
│ ├── msvs
│ │ └── absolutize_path.exe
│ └── BUCK
├── xcode
│ └── scheme_settings.bzl
└── apple
│ └── build_index
│ └── BUCK
├── third-party
├── hmaptool
│ ├── METADATA.bzl
│ ├── BUCK
│ └── README.md
└── tools
│ └── BUCK
├── go
├── tags
│ └── constraints
│ │ └── BUCK
└── tools
│ ├── gopackagesdriver
│ ├── BUCK
│ ├── driver
│ │ └── BUCK
│ └── main.go
│ ├── BUCK
│ └── gobuckify
│ └── BUCK
├── erlang
├── applications
│ └── BUCK
├── common_test
│ ├── common
│ │ ├── include
│ │ │ └── artifact_annotations.hrl
│ │ └── BUCK
│ ├── test_exec
│ │ └── src
│ │ │ └── test_exec.app.src
│ └── test_binary
│ │ └── BUCK
├── toolchain
│ ├── erlc_trampoline.sh
│ ├── escript_trampoline.sh
│ └── dependency_utils.erl
├── shell
│ └── BUCK
└── erlang_ls.config
├── zip_file
├── tools
│ └── BUCK
└── zip_file_toolchain.bzl
├── rust
├── custom-targets
│ ├── BUCK
│ └── targets
│ │ ├── riscv64imacf-unknown-none-elf.json
│ │ └── riscv64imacfv-unknown-none-elf.json
├── rust_common.bzl
├── with_workspace.bzl
└── tools
│ ├── cd_run.py
│ └── redirect_stdout.py
├── runtime
├── BUCK
└── constraints
│ └── BUCK
├── git
└── tools
│ └── BUCK
├── http_archive
└── tools
│ └── BUCK
├── julia
├── tools
│ └── BUCK
└── julia_toolchain.bzl
├── test
└── tools
│ └── BUCK
├── js
└── worker_runner
│ └── BUCK
├── pull_request_template.md
├── kotlin
├── tools
│ ├── compile_kotlin
│ │ └── BUCK
│ └── kapt_base64_encoder
│ │ └── BUCK
└── kotlin_utils.bzl
├── is_buck2_internal.bzl
├── aosp
└── aosp_providers.bzl
├── windows
└── tools
│ ├── BUCK
│ └── msvc_hermetic_exec.bat
├── attributes.bzl
├── matlab
├── matlab_info.bzl
├── matlab_toolchain.bzl
└── matlab.bzl
├── csharp
└── toolchain.bzl
├── lua
├── lua_binary.bzl
├── lua_library.bzl
└── cxx_lua_extension.bzl
├── is_buck2.bzl
├── is_full_meta_repo.bzl
├── playground
└── test.bxl
├── android
├── tools
│ └── com
│ │ └── facebook
│ │ └── buck_generated
│ │ └── AppWithoutResourcesStub.java
├── build_only_native_code.bzl
└── min_sdk_version.bzl
├── cache_mode.bzl
├── genrule_toolchain.bzl
├── utils
├── label_provider.bzl
├── actions.bzl
├── strings.bzl
├── source_listing.bzl
└── arglike.bzl
├── abi
├── BUCK
└── constraints
│ └── BUCK
├── decls
└── test_common.bzl
├── README.md
├── linking
└── types.bzl
├── java
├── dex_toolchain.bzl
└── utils
│ └── java_more_utils.bzl
├── user
└── rule_spec.bzl
├── tools
└── audit_providers_universe.bxl
└── platforms
└── apple
└── sdk.bzl
/apple/tools/empty.c:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/cxx/dist_lto/tools/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/my_extension.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/my_extension.cpp:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/my_extension.pyi:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Buck2 Prelude
2 |
3 | - Initial version.
4 |
--------------------------------------------------------------------------------
/go_bootstrap/tools/go.mod:
--------------------------------------------------------------------------------
1 | module tools
2 |
3 | go 1.22.5
4 |
--------------------------------------------------------------------------------
/apple/tools/bundling/test_resources/the.broken_json:
--------------------------------------------------------------------------------
1 | {
2 | "version":
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/plugin/javac-plugin.jar:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Top-level files and directories used by buck.
2 | /buck-out
3 | /.lsp-buck-out
4 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/zip/collect/testdata/zip-collector/tree.txt:
--------------------------------------------------------------------------------
1 | file
2 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_res/drawable/icon.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/apple/tools/selective_debugging/test_resources/focused_targets_empty.json:
--------------------------------------------------------------------------------
1 | {
2 | "targets": [
3 | ]
4 | }
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_res/drawable-ldpi/nine_patch.9.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_res/transition-v19/some_transition.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/toolchains/android/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("android_devxx")
4 |
5 | source_listing()
6 |
--------------------------------------------------------------------------------
/apple/tools/bundling/test_resources/newer_version_action_metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "data": {
4 | "something": []
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/apple/tools/bundling/test_resources/newer_version_incremental_state.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 7,
3 | "data": {
4 | "something": []
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/haskell/ide/hie.yaml:
--------------------------------------------------------------------------------
1 | cradle:
2 | bios:
3 | shell: buck2 bxl prelude//haskell/ide/ide.bxl --bios true --file $HIE_BIOS_ARG > $HIE_BIOS_OUTPUT
4 |
--------------------------------------------------------------------------------
/ide_integrations/visual_studio/assets/demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/ide_integrations/visual_studio/assets/demo.png
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/testrunner/META-INF/services/org.junit.jupiter.api.extension.Extension:
--------------------------------------------------------------------------------
1 | com.facebook.buck.testrunner.SkipTestCondition
2 |
--------------------------------------------------------------------------------
/toolchains/apple/xcode_version_checker/.gitignore:
--------------------------------------------------------------------------------
1 | xcode_version_checker.arm64
2 | xcode_version_checker.x86_64
3 | xcode_version_tester
4 | xcode_exec_tester
5 |
--------------------------------------------------------------------------------
/apple/tools/selective_debugging/test_resources/focused_targets.json:
--------------------------------------------------------------------------------
1 | {
2 | "targets": [
3 | "//fbobjc/buck2/samples/focused_debugging:Foo"
4 | ]
5 | }
--------------------------------------------------------------------------------
/ide_integrations/visual_studio/assets/how-it-works.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/ide_integrations/visual_studio/assets/how-it-works.png
--------------------------------------------------------------------------------
/ide_integrations/visual_studio/msvs/absolutize_path.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/ide_integrations/visual_studio/msvs/absolutize_path.exe
--------------------------------------------------------------------------------
/apple/tools/selective_debugging/test_resources/HelloWorld:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/apple/tools/selective_debugging/test_resources/HelloWorld
--------------------------------------------------------------------------------
/toolchains/apple/xcode_version_checker/xcode_version_checker:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/apple/xcode_version_checker/xcode_version_checker
--------------------------------------------------------------------------------
/third-party/hmaptool/METADATA.bzl:
--------------------------------------------------------------------------------
1 | METADATA = {
2 | "maintainers": [
3 | "build_infra",
4 | ],
5 | "name": "hmaptool",
6 | "owner": "build_infra",
7 | }
8 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/zip/aligned.4.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/zip/aligned.4.zip
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/zip/aligned.page.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/zip/aligned.page.zip
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/zip/sample-bytes.dat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/zip/sample-bytes.dat
--------------------------------------------------------------------------------
/toolchains/android/third-party/aosp/METADATA.bzl:
--------------------------------------------------------------------------------
1 | METADATA = {
2 | "maintainers": [
3 | "build_infra",
4 | ],
5 | "name": "aosp",
6 | "owner": "build_infra",
7 | }
8 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/plugin/dep-tracker.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/src/com/facebook/buck/jvm/kotlin/plugin/dep-tracker.jar
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/zip/aligned.4.no_extra.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/zip/aligned.4.no_extra.zip
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/testdata/prebuilt/tiny.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/jvm/java/testdata/prebuilt/tiny.jar
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/unarchive/testdata/output.tar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/unarchive/testdata/output.tar
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/sample/junit.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/sample/junit.jar
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/sample/unity.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/sample/unity.jar
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/testdata/prebuilt/junit.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/jvm/java/testdata/prebuilt/junit.jar
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/unarchive/testdata/output.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/unarchive/testdata/output.tar.bz2
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/unarchive/testdata/output.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/unarchive/testdata/output.tar.gz
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/unarchive/testdata/output.tar.xz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/unarchive/testdata/output.tar.xz
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/k2-jvm-abi-gen/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor:
--------------------------------------------------------------------------------
1 | com.facebook.K2JvmAbiCommandLineProcessor
2 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/k2-jvm-abi-gen/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar:
--------------------------------------------------------------------------------
1 | com.facebook.K2JvmAbiComponentRegistrar
2 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/sample/android.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/sample/android.jar
--------------------------------------------------------------------------------
/go/tags/constraints/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 | load(":defs.bzl", "generate_tag_constraints")
3 |
4 | oncall("build_infra")
5 |
6 | source_listing()
7 |
8 | generate_tag_constraints()
9 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting/noop/resources/META-INF/services/com.facebook.buck.jvm.kotlin.abtesting.ExperimentConfigService:
--------------------------------------------------------------------------------
1 | com.facebook.buck.jvm.kotlin.abtesting.noop.NoopExperimentConfigService
2 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_invalid_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - 100
4 |
5 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/resources/testdata/aapt_dump/example.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/android/resources/testdata/aapt_dump/example.apk
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_missing_name_attr.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Howdy!
4 |
5 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/zip/collect/testdata/zip-collector/zip-1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/zip/collect/testdata/zip-collector/zip-1.zip
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/zip/collect/testdata/zip-collector/zip-2.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/util/zip/collect/testdata/zip-collector/zip-2.zip
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/logger/noop/resources/META-INF/services/com.facebook.buck.jvm.kotlin.cd.analytics.logger.KotlinCDLogger:
--------------------------------------------------------------------------------
1 | com.facebook.buck.jvm.kotlin.cd.analytics.logger.noop.KotlinCDNoopLogger
2 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_invalid_resource_type.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 100
4 |
5 |
--------------------------------------------------------------------------------
/erlang/applications/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//erlang:erlang_otp_application.bzl", "gen_otp_applications")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("build_infra")
5 |
6 | source_listing()
7 |
8 | gen_otp_applications()
9 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/resources/testdata/aapt_dump/row_with_button.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/facebook/buck2-prelude/HEAD/toolchains/android/test/com/facebook/buck/android/resources/testdata/aapt_dump/row_with_button.xml
--------------------------------------------------------------------------------
/zip_file/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | python_bootstrap_binary(
8 | name = "unzip",
9 | main = "unzip.py",
10 | visibility = ["PUBLIC"],
11 | )
12 |
--------------------------------------------------------------------------------
/rust/custom-targets/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.export_file(
10 | name = "targets",
11 | visibility = ["PUBLIC"],
12 | )
13 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/stubsgen/plugin/stubsgen/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar:
--------------------------------------------------------------------------------
1 | com.facebook.kotlin.compilerplugins.kosabi.stubsgen.plugin.stubsgen.StubsCodegenComponentRegistrar
2 |
--------------------------------------------------------------------------------
/python/runtime/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("plf_experience")
4 |
5 | source_listing()
6 |
7 | filegroup(
8 | name = "bootstrap_files",
9 | srcs = glob(["__par__/**/*.py"]),
10 | visibility = ["PUBLIC"],
11 | )
12 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/stubsgen/plugin/stubsgen/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor:
--------------------------------------------------------------------------------
1 | com.facebook.kotlin.compilerplugins.kosabi.stubsgen.plugin.stubsgen.StubsCodegenCommandLineProcessor
2 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_4.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello, %s!
4 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/stubsgen/plugin/stubsgen_k2/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor:
--------------------------------------------------------------------------------
1 | com.facebook.kotlin.compilerplugins.kosabi.stubsgen.plugin.stubsgen_k2.StubsCodegenCommandLineProcessor
2 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello, %s!
4 |
5 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_invalid_node_id.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
--------------------------------------------------------------------------------
/runtime/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | # Used by open source projects to support `prelude//`
8 |
9 | config_setting(
10 | name = "fbcode",
11 | visibility = ["PUBLIC"],
12 | )
13 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/stubsgen/plugin/source_modifier/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.ComponentRegistrar:
--------------------------------------------------------------------------------
1 | com.facebook.kotlin.compilerplugins.kosabi.stubsgen.plugin.source_modifier.SourceModifierComponentRegistrar
2 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/stubsgen/plugin/stubsgen_k2/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar:
--------------------------------------------------------------------------------
1 | com.facebook.kotlin.compilerplugins.kosabi.stubsgen.plugin.stubsgen_k2.StubsCodegenCompilerPluginRegistrar
2 |
--------------------------------------------------------------------------------
/toolchains/cxx/clang/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 | load(":tools.bzl", "path_clang_tools")
3 |
4 | oncall("build_infra")
5 |
6 | source_listing()
7 |
8 | path_clang_tools(
9 | name = "path_clang_tools",
10 | visibility = ["PUBLIC"],
11 | )
12 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/stubsgen/plugin/source_modifier/resources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CommandLineProcessor:
--------------------------------------------------------------------------------
1 | com.facebook.kotlin.compilerplugins.kosabi.stubsgen.plugin.source_modifier.SourceModifierCommandLineProcessor
2 |
--------------------------------------------------------------------------------
/apple/tools/selective_debugging/test_resources/focused_spec_regex_all.json:
--------------------------------------------------------------------------------
1 | {
2 | "include_build_target_patterns": [],
3 | "include_regular_expressions": ["fbsource//fbobjc/buck2/samples/focused_debugging:*"],
4 | "exclude_build_target_patterns": [],
5 | "exclude_regular_expressions": []
6 | }
7 |
--------------------------------------------------------------------------------
/apple/tools/bundling/test_resources/valid_action_metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 1,
3 | "digests": [
4 | {
5 | "path": "repo/foo.txt",
6 | "digest": "foo_digest"
7 | },
8 | {
9 | "path": "buck-out/bar.txt",
10 | "digest": "bar_digest"
11 | }
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/git/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.python_bootstrap_binary(
10 | name = "git_fetch",
11 | main = "git_fetch.py",
12 | visibility = ["PUBLIC"],
13 | )
14 |
--------------------------------------------------------------------------------
/apple/tools/code_signing_using_manifest/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("apple_workflows")
4 |
5 | source_listing()
6 |
7 | python_binary(
8 | name = "codesign_bundle_using_manifest",
9 | main = "main.py",
10 | visibility = ["PUBLIC"],
11 | )
12 |
--------------------------------------------------------------------------------
/apple/tools/selective_debugging/test_resources/focused_spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "include_build_target_patterns": [
3 | "//fbobjc/buck2/samples/focused_debugging:Foo"
4 | ],
5 | "include_regular_expressions": [],
6 | "exclude_build_target_patterns": [],
7 | "exclude_regular_expressions": []
8 | }
9 |
--------------------------------------------------------------------------------
/apple/tools/codesign_manifest_tree_postprocessor/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("ios_devx")
4 |
5 | source_listing()
6 |
7 | python_binary(
8 | name = "codesign_manifest_tree_postprocessor",
9 | main = "main.py",
10 | visibility = ["PUBLIC"],
11 | )
12 |
--------------------------------------------------------------------------------
/apple/tools/signing_context_tree_postprocessor/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("apple_workflows")
4 |
5 | source_listing()
6 |
7 | python_binary(
8 | name = "signing_context_tree_postprocessor",
9 | main = "main.py",
10 | visibility = ["PUBLIC"],
11 | )
12 |
--------------------------------------------------------------------------------
/http_archive/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//http_archive:exec_deps.bzl", "http_archive_exec_deps")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("build_infra")
5 |
6 | source_listing()
7 |
8 | http_archive_exec_deps(
9 | name = "exec_deps",
10 | visibility = ["PUBLIC"],
11 | )
12 |
--------------------------------------------------------------------------------
/julia/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.python_bootstrap_binary(
10 | name = "parse_julia_cmd",
11 | main = "parse_julia_cmd.py",
12 | visibility = ["PUBLIC"],
13 | )
14 |
--------------------------------------------------------------------------------
/test/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.python_bootstrap_binary(
10 | name = "inject_test_env",
11 | main = "inject_test_env.py",
12 | visibility = ["PUBLIC"],
13 | )
14 |
--------------------------------------------------------------------------------
/go_bootstrap/tools/README.md:
--------------------------------------------------------------------------------
1 | # How to work with third-party deps?
2 |
3 | Use [`go` tool](https://go.dev/doc/modules/managing-dependencies) for that
4 |
5 | 1. Add/Remove a dependency in your code
6 | 1. `cd buck2/prelude/go_bootstrap/tools`
7 | 1. `go mod tidy` - to resolve deps
8 | 1. `go mod vendor` - to save deps in the repo
9 |
--------------------------------------------------------------------------------
/js/worker_runner/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.python_bootstrap_binary(
10 | name = "worker_tool_runner",
11 | main = "worker_tool_runner.py",
12 | visibility = ["PUBLIC"],
13 | )
14 |
--------------------------------------------------------------------------------
/toolchains/apple/xcode_version_checker/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | export_file(
8 | name = "xcode_version_checker",
9 | labels = ["buck2-only"],
10 | mode = "reference",
11 | visibility = ["PUBLIC"],
12 | )
13 |
--------------------------------------------------------------------------------
/third-party/hmaptool/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native # Avoid warnings and auto-formatters
8 |
9 | prelude.export_file(
10 | name = "hmaptool",
11 | src = "hmaptool",
12 | visibility = ["PUBLIC"],
13 | )
14 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_invalid_definition.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/haskell/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.python_bootstrap_binary(
10 | name = "script_template_processor",
11 | main = "script_template_processor.py",
12 | visibility = ["PUBLIC"],
13 | )
14 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_android_drawables.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | xmlns:fbui="http://schemas.android.com/apk/res-auto"
4 | android:src="@drawable/other_bitmap">
5 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_invalid_reference.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/apple/tools/code_signing/test_resources/test2.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | application-identifier
6 | ABCDE12345.com.example.TestApp
7 |
8 |
9 |
--------------------------------------------------------------------------------
/apple/tools/selective_debugging/test_resources/focused_spec_regex_none.json:
--------------------------------------------------------------------------------
1 | {
2 | "include_build_target_patterns": [],
3 | "include_regular_expressions": ["fbsource//fbobjc/buck2/samples/focused_debugging:*"],
4 | "exclude_build_target_patterns": [],
5 | "exclude_regular_expressions": ["//fbobjc/buck2/samples/focused_debugging:*"]
6 | }
7 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/zip/CustomZipEntryWithPath.kt:
--------------------------------------------------------------------------------
1 | // (c) Meta Platforms, Inc. and affiliates. Confidential and proprietary.
2 |
3 | package com.facebook.buck.util.zip
4 |
5 | import java.nio.file.Path
6 | import java.util.Optional
7 |
8 | data class CustomZipEntryWithPath(val entry: CustomZipEntry, val path: Optional)
9 |
--------------------------------------------------------------------------------
/apple/tools/code_signing/test_resources/test1.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | keychain-access-groups
6 |
7 | ABCDE12345.com.example.TestApp
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/go/tools/gopackagesdriver/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("golang")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.go_binary(
10 | name = "gopackagesdriver",
11 | srcs = ["main.go"],
12 | visibility = ["PUBLIC"],
13 | deps = [
14 | "prelude//go/tools/gopackagesdriver/driver:driver",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/pull_request_template.md:
--------------------------------------------------------------------------------
1 | IMPORTANT: Please don't raise pull requests here, but at
2 | [facebook/buck2](https://github.com/facebook/buck2/pulls).
3 |
4 | The [`prelude`](https://github.com/facebook/buck2/tree/main/prelude) directory
5 | is a mirror of this repo, but that repo also features CI tests and is more
6 | actively monitored. Any PR's landing there will automatically show up here at
7 | the same time.
8 |
--------------------------------------------------------------------------------
/kotlin/tools/compile_kotlin/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.python_bootstrap_binary(
10 | name = "compile_kotlin",
11 | main = "compile_kotlin.py",
12 | visibility = ["PUBLIC"],
13 | deps = [
14 | "prelude//java/tools:utils_lib",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/io/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "io",
10 | srcs = glob(["*.java"]),
11 | visibility = ["PUBLIC"],
12 | deps = [
13 | ],
14 | )
15 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/android/device/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "device",
10 | srcs = glob(["*.java"]),
11 | visibility = [
12 | "PUBLIC",
13 | ],
14 | )
15 |
--------------------------------------------------------------------------------
/apple/tools/code_signing/test_resources/test3.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.developer.team-identifier
6 | ABCDE12345
7 | CFBundleIdentifier
8 | com.example.TestApp
9 |
10 |
11 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/alias.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/lib.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/main.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/subdir/util.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/subdir/util.pyi:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
--------------------------------------------------------------------------------
/is_buck2_internal.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | yes = True
10 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/subdir/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
--------------------------------------------------------------------------------
/python/sourcedb/tests/test_files/subdir/__init__.pyi:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
--------------------------------------------------------------------------------
/toolchains/android/android/com/facebook/buck/android/support/exopackage/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools/build_rules:fb_native.bzl", "fb_native")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | fb_native.android_library(
9 | name = "exopackage",
10 | srcs = glob(["*.java"]),
11 | visibility = [
12 | "PUBLIC",
13 | ],
14 | )
15 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/io/windowsfs/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "windowsfs",
10 | srcs = glob(["*.java"]),
11 | visibility = ["PUBLIC"],
12 | deps = ["prelude//toolchains/android/third-party:jna"],
13 | )
14 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_custom_drawables.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | xmlns:fbui="http://schemas.android.com/apk/res-auto"
4 | fbui:imageUri="http://facebook.com"
5 | android:width="128px"
6 | android:height="128px"
7 | fbui:density="160"
8 | >
9 |
10 |
--------------------------------------------------------------------------------
/aosp/aosp_providers.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | AospJarInfo = provider(fields = {})
10 |
--------------------------------------------------------------------------------
/apple/apple_platforms.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | APPLE_PLATFORMS_KEY = "_apple_platforms"
10 |
--------------------------------------------------------------------------------
/erlang/common_test/common/include/artifact_annotations.hrl:
--------------------------------------------------------------------------------
1 | %% Copyright (c) Meta Platforms, Inc. and affiliates.
2 | %%
3 | %% This source code is licensed under both the MIT license found in the
4 | %% LICENSE-MIT file in the root directory of this source tree and the Apache
5 | %% License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | %% of this source tree.
7 |
8 | %% @format
9 |
10 | -define(GENERIC_BLOB, 1).
11 | -define(GENERIC_TEXT_LOG, 2).
12 |
--------------------------------------------------------------------------------
/windows/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.export_file(
10 | name = "msvc_hermetic_exec.bat",
11 | src = "msvc_hermetic_exec.bat",
12 | has_content_based_path = True,
13 | )
14 |
15 | prelude.command_alias(
16 | name = "msvc_hermetic_exec",
17 | exe = ":msvc_hermetic_exec.bat",
18 | visibility = ["PUBLIC"],
19 | )
20 |
--------------------------------------------------------------------------------
/toolchains/apple/xcode_version_checker/README:
--------------------------------------------------------------------------------
1 | - Run `make` to compile the `xcode_version_checker` binary.
2 | - Run `make all` to compile the `xcode_version_checker` binary and run all tests.
3 | - Run `make test` to just run tests.
4 | - Run `make clean` to delete tests and intermediate binaries.
5 |
6 | We cannot include this as part of the toolchain because of
7 | bootstrapping issues: i.e., compiling it requires an
8 | `apple_toolchain` but its needed to define an `apple_toolchain`.
9 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/android/zipalign/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "zipalign",
10 | srcs = glob(["*.java"]),
11 | visibility = ["PUBLIC"],
12 | deps = [
13 | "prelude//toolchains/android/third-party:guava",
14 | ],
15 | )
16 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/function/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "function",
10 | srcs = glob(["*.java"]),
11 | visibility = ["PUBLIC"],
12 | deps = [
13 | "prelude//toolchains/android/third-party:guava",
14 | ],
15 | )
16 |
--------------------------------------------------------------------------------
/attributes.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # The specs you are looking for have moved into the prelude/decls directory
10 |
--------------------------------------------------------------------------------
/erlang/toolchain/erlc_trampoline.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
3 | #
4 | # This source code is dual-licensed under either the MIT license found in the
5 | # LICENSE-MIT file in the root directory of this source tree or the Apache
6 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | # of this source tree. You may select, at your option, one of the
8 | # above-listed licenses.
9 |
10 | set -eu
11 |
12 | $1 "${@:2}" 1>&2
13 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/installer/common/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "options_handler",
10 | srcs = glob(["*.java"]),
11 | visibility = [
12 | "PUBLIC",
13 | ],
14 | exported_deps = ["prelude//toolchains/android/third-party:args4j"],
15 | )
16 |
--------------------------------------------------------------------------------
/apple/scene_kit_assets_types.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | SceneKitAssetsSpec = record(
10 | path = field(Artifact),
11 | )
12 |
--------------------------------------------------------------------------------
/matlab/matlab_info.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | MatlabToolchainInfo = provider(fields = {
10 | "matlab_exe": RunInfo,
11 | })
12 |
--------------------------------------------------------------------------------
/apple/tools/code_signing/dummy_binary_for_signing.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | int main() {
12 | return 0;
13 | }
14 |
--------------------------------------------------------------------------------
/csharp/toolchain.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | CSharpToolchainInfo = provider(fields = [
10 | "csc",
11 | "framework_dirs",
12 | ])
13 |
--------------------------------------------------------------------------------
/lua/lua_binary.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def lua_binary_impl(_ctx: AnalysisContext) -> list[Provider]:
10 | return [DefaultInfo()]
11 |
--------------------------------------------------------------------------------
/lua/lua_library.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def lua_library_impl(_ctx: AnalysisContext) -> list[Provider]:
10 | return [DefaultInfo()]
11 |
--------------------------------------------------------------------------------
/apple/tools/selective_debugging/utils.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # pyre-strict
10 |
11 |
12 | class MachOException(Exception):
13 | pass
14 |
--------------------------------------------------------------------------------
/haskell/haskell_ide.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def haskell_ide_impl(_ctx: AnalysisContext) -> list[Provider]:
10 | return [DefaultInfo()]
11 |
--------------------------------------------------------------------------------
/is_buck2.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//:is_buck2_internal.bzl", "yes")
10 |
11 | def is_buck2():
12 | return yes == True
13 |
--------------------------------------------------------------------------------
/erlang/toolchain/escript_trampoline.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
3 | #
4 | # This source code is dual-licensed under either the MIT license found in the
5 | # LICENSE-MIT file in the root directory of this source tree or the Apache
6 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | # of this source tree. You may select, at your option, one of the
8 | # above-listed licenses.
9 |
10 | cmd=("$2" "$1/run.escript" "${@:3}")
11 |
12 | "${cmd[@]}"
13 |
--------------------------------------------------------------------------------
/lua/cxx_lua_extension.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def cxx_lua_extension_impl(_ctx: AnalysisContext) -> list[Provider]:
10 | return [DefaultInfo()]
11 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/android/apk/sdk/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "apk_builder",
10 | srcs = glob(["*.java"]),
11 | required_for_source_only_abi = True,
12 | visibility = ["PUBLIC"],
13 | deps = [
14 | "prelude//toolchains/android/third-party:guava",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/is_full_meta_repo.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def is_full_meta_repo() -> bool:
10 | return read_root_config("buck2", "is_full_meta_repo", None) == "true"
11 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/javax/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "javax",
10 | srcs = glob([
11 | "*.java",
12 | ]),
13 | visibility = ["PUBLIC"],
14 | deps = [
15 | "prelude//toolchains/android/src/com/facebook/buck/jvm/java/version/utils:utils",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/apple/apple_core_data_types.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | AppleCoreDataSpec = record(
10 | module = field(str | None),
11 | path = field(Artifact),
12 | )
13 |
--------------------------------------------------------------------------------
/apple/arch.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | _APPLE_ARCHES = [
10 | "arm64",
11 | "arm64_32",
12 | "x86_64",
13 | ]
14 |
15 | AppleArch = enum(*_APPLE_ARCHES)
16 |
--------------------------------------------------------------------------------
/haskell/ide/README.md:
--------------------------------------------------------------------------------
1 | # Haskell Language Server integration
2 |
3 | This integration allows loading `haskell_binary` and `haskell_library` targets
4 | on Haskell Language Server. This is accomplished via a BXL script that is used
5 | to drive a hie-bios "bios" cradle.
6 |
7 | # Usage
8 |
9 | To print the list of GHC flags and targets for a Haskell source file:
10 |
11 | buck2 bxl prelude//haskell/ide/ide.bxl -- --bios true --file
12 |
13 |
14 | To integrate with hie_bios, copy `hie.yaml` to your repo root
15 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/io/pathformat/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "pathformat",
10 | srcs = glob(["*.java"]),
11 | visibility = [
12 | "PUBLIC",
13 | ],
14 | exported_deps = [
15 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/plugin/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "plugin-loader",
10 | srcs = ["PluginLoader.java"],
11 | resources = [
12 | "dep-tracker.jar",
13 | ],
14 | visibility = [
15 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin:",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/ddplist/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "ddplist",
10 | srcs = glob(["*.java"]),
11 | resources = glob(["test-files/*.plist"]),
12 | deps = [
13 | "prelude//toolchains/android/third-party:dd-plist",
14 | "prelude//toolchains/android/third-party:junit",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/aapt/testdata/android_project/sample_resources_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/apple/apple_resource_dedupe_alias.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def apple_resource_dedupe_alias_impl(ctx: AnalysisContext) -> list[Provider]:
10 | return ctx.attrs.actual.providers
11 |
--------------------------------------------------------------------------------
/playground/test.bxl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def _impl(ctx):
10 | ctx.output.print("123")
11 |
12 | playground = bxl_main(
13 | impl = _impl,
14 | cli_args = {},
15 | )
16 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/xml/testdata/sample.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting/ksic/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "ksic",
10 | srcs = glob(["**/*.kt"]),
11 | visibility = [
12 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/...",
13 | "prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/...",
14 | ],
15 | )
16 |
--------------------------------------------------------------------------------
/third-party/tools/BUCK:
--------------------------------------------------------------------------------
1 | # @lint-ignore BUCKLINT missing-oncall-call-severe This file is unowned -
2 |
3 | # DO NOT EDIT THIS FILE WITHOUT ADDING AN ONCALL - YOUR CHANGES
4 |
5 | # WILL BE DELETED. UNLESS THERE IS AN ONCALL ADDED THIS FILE WILL BE
6 |
7 | # DELETED WITHOUT NOTICE - DO NOT DEPEND ON IT.
8 | load("@prelude//utils:source_listing.bzl", "source_listing")
9 |
10 | source_listing()
11 |
12 | prelude = native
13 |
14 | prelude.python_bootstrap_binary(
15 | name = "create_build",
16 | main = "create_build.py",
17 | visibility = ["PUBLIC"],
18 | )
19 |
--------------------------------------------------------------------------------
/toolchains/android/third-party/aosp/tools-targetApi.patch:
--------------------------------------------------------------------------------
1 | diff --git a/third-party/java/aosp/src/com/android/manifmerger/OtherOperationType.java b/third-party/java/aosp/src/com/android/manifmerger/OtherOperationType.java
2 | index d0ca70b544..0b7f76885b 100644
3 | --- a/third-party/java/aosp/src/com/android/manifmerger/OtherOperationType.java
4 | +++ b/third-party/java/aosp/src/com/android/manifmerger/OtherOperationType.java
5 | @@ -26,5 +26,5 @@ public enum OtherOperationType {
6 | ignore,
7 |
8 | // used to direct lint
9 | - targetAPI
10 | + targetApi
11 | }
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/dex/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "dex",
10 | srcs = glob(["*.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/android/dex:dex",
13 | "prelude//toolchains/android/third-party:guava",
14 | "prelude//toolchains/android/third-party:junit",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/windows/tools/msvc_hermetic_exec.bat:
--------------------------------------------------------------------------------
1 | @REM Copyright (c) Meta Platforms, Inc. and affiliates.
2 | @REM
3 | @REM This source code is dual-licensed under either the MIT license found in the
4 | @REM LICENSE-MIT file in the root directory of this source tree or the Apache
5 | @REM License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | @REM of this source tree. You may select, at your option, one of the
7 | @REM above-listed licenses.
8 |
9 | @echo off
10 | %* /nologo "/d1trimfile:%cd%\" "/d2trimfile:%cd%\" "/experimental:deterministic" "/pathmap:%cd%\="
11 |
--------------------------------------------------------------------------------
/android/tools/com/facebook/buck_generated/AppWithoutResourcesStub.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck_generated;
12 |
13 | final class AppWithoutResourcesStub {}
14 |
--------------------------------------------------------------------------------
/apple/tools/re_compatibility_utils/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.python_library(
10 | name = "re_compatibility_utils",
11 | srcs = [
12 | "writable.py",
13 | ],
14 | visibility = ["PUBLIC"],
15 | )
16 |
17 | prelude.python_bootstrap_library(
18 | name = "bootstrap_re_compatibility_utils",
19 | srcs = [
20 | "writable.py",
21 | ],
22 | has_content_based_path = True,
23 | visibility = ["PUBLIC"],
24 | )
25 |
--------------------------------------------------------------------------------
/cache_mode.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | CacheModeInfo = provider(fields = {"allow_cache_uploads": provider_field(typing.Any, default = None), "cache_bust_genrules": provider_field(typing.Any, default = None)})
10 |
--------------------------------------------------------------------------------
/cxx/gcno.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # Provider that exposes the .gcno files produced during compilation
10 | GcnoFilesInfo = provider(fields = {
11 | "gcno_files": provider_field(list[Artifact]),
12 | })
13 |
--------------------------------------------------------------------------------
/erlang/shell/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | erlang_application(
8 | name = "buck2_shell_utils",
9 | srcs = glob(["src/*.erl"]),
10 | applications = [
11 | "kernel",
12 | "stdlib",
13 | ],
14 | erl_opts = [
15 | "+debug_info",
16 | "+warnings_as_errors",
17 | ],
18 | included_applications = [
19 | "prelude//erlang/common_test/test_exec:test_exec",
20 | ],
21 | shell_libs = [],
22 | visibility = ["PUBLIC"],
23 | )
24 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/core/util/log/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "log",
10 | srcs = glob(["*.java"]),
11 | visibility = ["PUBLIC"],
12 | deps = [
13 | "prelude//toolchains/android/src/com/facebook/buck/core/util/log/appendablelogrecord:appendablelogrecord",
14 | "prelude//toolchains/android/third-party:jsr305",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/erlang/common_test/test_exec/src/test_exec.app.src:
--------------------------------------------------------------------------------
1 | %% Copyright (c) Meta Platforms, Inc. and affiliates.
2 | %%
3 | %% This source code is licensed under both the MIT license found in the
4 | %% LICENSE-MIT file in the root directory of this source tree and the Apache
5 | %% License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | %% of this source tree.
7 |
8 | %% @format
9 | {application, test_exec, [
10 | {vsn, "1.0.0"},
11 | {env, [
12 | {test_env, "override_me"},
13 | {test_runner, "override_me"},
14 | {ct_daemon_hooks, []}
15 | ]}
16 | ]}.
17 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/usedclasses/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "usedclasses",
10 | srcs = glob(["**/*.kt"]),
11 | labels = ["codegen_rule"],
12 | tests = [
13 | "prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/compilerplugins/usedclasses:usedclasses",
14 | ],
15 | visibility = ["PUBLIC"],
16 | )
17 |
--------------------------------------------------------------------------------
/toolchains/msvc/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 | load(":tools.bzl", "find_msvc_tools")
3 |
4 | oncall("build_infra")
5 |
6 | source_listing()
7 |
8 | python_bootstrap_binary(
9 | name = "vswhere",
10 | main = "vswhere.py",
11 | visibility = ["PUBLIC"],
12 | )
13 |
14 | python_bootstrap_binary(
15 | name = "run_msvc_tool",
16 | main = "run_msvc_tool.py",
17 | visibility = ["PUBLIC"],
18 | )
19 |
20 | find_msvc_tools(
21 | name = "msvc_tools",
22 | target_compatible_with = ["config//os:windows"],
23 | visibility = ["PUBLIC"],
24 | )
25 |
--------------------------------------------------------------------------------
/genrule_toolchain.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | GenruleToolchainInfo = provider(
10 | doc = "Genrule toolchain info",
11 | fields = {
12 | "zip_scrubber": provider_field(typing.Any, default = None),
13 | },
14 | )
15 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/resources/strings/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "strings",
10 | srcs = glob(["*.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/android/resources/strings:strings",
13 | "prelude//toolchains/android/third-party:guava",
14 | "prelude//toolchains/android/third-party:junit",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/python/tools/sourcedb_merger/tests/main.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
3 | #
4 | # This source code is dual-licensed under either the MIT license found in the
5 | # LICENSE-MIT file in the root directory of this source tree or the Apache
6 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | # of this source tree. You may select, at your option, one of the
8 | # above-listed licenses.
9 |
10 | PYTHONPATH="$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")"
11 | export PYTHONPATH
12 | exec python3 -m unittest sourcedb_merger.tests
13 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/liteinfersupport/PropagatesNullable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.util.liteinfersupport;
12 |
13 | public @interface PropagatesNullable {}
14 |
--------------------------------------------------------------------------------
/erlang/common_test/common/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | erlang_application(
8 | name = "common",
9 | srcs = glob([
10 | "src/*.erl",
11 | "src/*.hrl",
12 | ]),
13 | applications = [
14 | "kernel",
15 | "stdlib",
16 | ],
17 | erl_opts = [
18 | "+debug_info",
19 | "+warnings_as_errors",
20 | ],
21 | includes = glob(["include/*.hrl"]),
22 | shell_libs = [],
23 | use_global_parse_transforms = False,
24 | visibility = ["PUBLIC"],
25 | )
26 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/android/proguard/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | TRANSLATOR_SRCS = [
9 | "ProguardMapping.java",
10 | "ProguardTranslatorFactory.java",
11 | ]
12 |
13 | buck_java_library(
14 | name = "translator",
15 | srcs = TRANSLATOR_SRCS,
16 | visibility = [
17 | "PUBLIC",
18 | ],
19 | deps = [
20 | "prelude//toolchains/android/third-party:guava",
21 | ],
22 | )
23 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/unit/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "unit",
10 | srcs = glob(["*.java"]),
11 | tests = [
12 | "prelude//toolchains/android/test/com/facebook/buck/util/unit:unit",
13 | ],
14 | visibility = ["PUBLIC"],
15 | deps = [
16 | "prelude//toolchains/android/third-party:guava",
17 | ],
18 | exported_deps = [
19 | ],
20 | )
21 |
--------------------------------------------------------------------------------
/zip_file/zip_file_toolchain.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | ZipFileToolchainInfo = provider(
10 | doc = "ZipFile toolchain info",
11 | fields = {
12 | "create_zip": provider_field(typing.Any, default = None),
13 | },
14 | )
15 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/resources/testdata/aapt_dump/example.apk.strings:
--------------------------------------------------------------------------------
1 | String pool of 14 unique UTF-8 non-sorted strings, 14 entries and 1 styles using 360 bytes:
2 | String #0: some bold string
3 | String #1: res/drawable/aaa_image.png
4 | String #2: res/drawable/other_image.png
5 | String #3: res/xml/meta_xml.xml
6 | String #4: res/drawable-nodpi-v4/exo_icon.png
7 | String #5: res/drawable-nodpi-v4/image.png
8 | String #6: some other string
9 | String #7: Exo Test App
10 | String #8: res_1a
11 | String #9: item0
12 | String #10: item1
13 | String #11: item2
14 | String #12:
15 | String #13: b
16 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/descriptor_and_signature_factories/DependencyInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.foo;
12 |
13 | public interface DependencyInterface {}
14 |
--------------------------------------------------------------------------------
/apple/user/apple_selected_debug_path_file.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # The file name used to store the user's selected debug path in selective debugging
10 | # Will save to the root of app bundle
11 | SELECTED_DEBUG_PATH_FILE_NAME = "SelectedDebugPaths.txt"
12 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/xml/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "xml",
10 | srcs = glob(["*.java"]),
11 | tests = [
12 | "prelude//toolchains/android/test/com/facebook/buck/util/xml:xml",
13 | ],
14 | visibility = ["PUBLIC"],
15 | deps = [
16 | "prelude//toolchains/android/third-party:guava",
17 | "prelude//toolchains/android/third-party:jsr305",
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/descriptor_and_signature_factories/DependencyException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.foo;
12 |
13 | public class DependencyException extends Exception {}
14 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/step/BUCK:
--------------------------------------------------------------------------------
1 | load(
2 | "@prelude//toolchains/android/tools:build_rules.bzl",
3 | "buck_kotlin_library",
4 | )
5 | load("@prelude//utils:source_listing.bzl", "source_listing")
6 |
7 | oncall("android_devxx")
8 |
9 | source_listing()
10 |
11 | buck_kotlin_library(
12 | name = "step",
13 | srcs = glob(
14 | [
15 | "*.java",
16 | "*.kt",
17 | ],
18 | ),
19 | visibility = ["PUBLIC"],
20 | deps = [
21 | "prelude//toolchains/android/src/com/facebook/buck/util:process_executor",
22 | ],
23 | exported_deps = [
24 | ],
25 | )
26 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/cd/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_test(
9 | name = "cd",
10 | srcs = glob(
11 | [
12 | "**/*.kt",
13 | ],
14 | ),
15 | deps = [
16 | "prelude//toolchains/android/src/com/facebook/buck/jvm/cd:cd",
17 | "prelude//toolchains/android/src/com/facebook/buck/util/json:json",
18 | "prelude//toolchains/android/third-party:junit",
19 | ],
20 | )
21 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/kotlin/compilerplugins/usedclasses/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_test(
9 | name = "usedclasses",
10 | srcs = glob(
11 | [
12 | "**/*.kt",
13 | ],
14 | ),
15 | deps = [
16 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/usedclasses:usedclasses",
17 | "prelude//toolchains/android/third-party:junit",
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/android/build_only_native_code.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def is_build_only_native_code():
10 | return select(
11 | {
12 | "DEFAULT": False,
13 | "prelude//android/constraints:build_only_native_code": True,
14 | },
15 | )
16 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/core/util/graph/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "standard_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | standard_java_test(
9 | name = "graph",
10 | deps = [
11 | "prelude//toolchains/android/src/com/facebook/buck/core/util/graph:graph",
12 | "prelude//toolchains/android/src/com/facebook/buck/util/function:function",
13 | "prelude//toolchains/android/third-party:guava",
14 | "prelude//toolchains/android/third-party:junit",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/toolchains/execution_host.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//utils:host.bzl", "HostOSTypes")
10 |
11 | _ExecutionHostOSTypes = HostOSTypes + ["fat"] # Fat toolchains are compatible on multiple OSes.
12 |
13 | ExecutionHostOSType = enum(*_ExecutionHostOSTypes)
14 |
--------------------------------------------------------------------------------
/utils/label_provider.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | LabelInfo = provider(
10 | fields = {
11 | # List of labels for the target
12 | "labels": provider_field(
13 | typing.Any,
14 | default = None,
15 | ),
16 | },
17 | )
18 |
--------------------------------------------------------------------------------
/abi/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | config_setting(
8 | name = "gnu",
9 | constraint_values = [
10 | "prelude//abi/constraints:gnu",
11 | ],
12 | visibility = ["PUBLIC"],
13 | )
14 |
15 | config_setting(
16 | name = "msvc",
17 | constraint_values = [
18 | "prelude//abi/constraints:msvc",
19 | ],
20 | visibility = ["PUBLIC"],
21 | )
22 |
23 | config_setting(
24 | name = "musl",
25 | constraint_values = [
26 | "prelude//abi/constraints:musl",
27 | ],
28 | visibility = ["PUBLIC"],
29 | )
30 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/apkmodule/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "standard_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | standard_java_test(
9 | name = "apkmodule",
10 | deps = [
11 | "prelude//toolchains/android/src/com/facebook/buck/android/apkmodule:apkmodule",
12 | "prelude//toolchains/android/src/com/facebook/buck/core/util/graph:graph",
13 | "prelude//toolchains/android/third-party:guava",
14 | "prelude//toolchains/android/third-party:junit",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/ddplist/test-files/test1.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | keyA
6 | valueA
7 | key&B
8 | value&B
9 | date
10 | 2011-11-28T09:21:30Z
11 | data
12 | AAAA BBBB CCCC
13 | array
14 |
15 |
16 |
17 | 87
18 | 3.14159
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "abtesting",
10 | srcs = glob(["**/*.kt"]),
11 | visibility = [
12 | "prelude//toolchains/android/meta_only/src/com/facebook/buck/jvm/kotlin/abtesting/...",
13 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/...",
14 | "prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/...",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/toolchains/android/tools/build_rules/fb_native.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # @oss-disable[end= ]: load("@fbsource//tools/build_defs:fb_native_wrapper.bzl", _fb_native = "fb_native")
10 | load("@prelude//:native.bzl", _fb_native = "native") # @oss-enable
11 |
12 | fb_native = _fb_native
13 |
--------------------------------------------------------------------------------
/apple/apple_swift_stdlib.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | _SKIP_COPYING_SWIFT_STDLIB_EXTENSIONS = [
10 | ".framework",
11 | ".appex",
12 | ]
13 |
14 | def should_copy_swift_stdlib(bundle_extension: str) -> bool:
15 | return bundle_extension not in _SKIP_COPYING_SWIFT_STDLIB_EXTENSIONS
16 |
--------------------------------------------------------------------------------
/toolchains/apple/xcode_version_checker/test/Xcode_14.2.0_14C18_fb_version.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildVersion
6 | 49
7 | CFBundleShortVersionString
8 | 14.2
9 | CFBundleVersion
10 | 21534
11 | ProductBuildVersion
12 | 14C18
13 | ProjectName
14 | IDEFrameworks
15 | SourceVersion
16 | 21534000000000000
17 |
18 |
19 |
--------------------------------------------------------------------------------
/ide_integrations/xcode/scheme_settings.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | XCODE_SCHEME_SETTINGS_ATTR_NAME = "xcode_scheme_settings"
10 | XCODE_SCHEME_SETTINGS_ATTR_TYPE = attrs.option(attrs.source(), default = None, doc = "Optional settings to set on schemes when this target is represented in Xcode.")
11 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/installer/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "installer_server",
10 | srcs = glob([
11 | "*.java",
12 | "*.kt",
13 | ]),
14 | visibility = [
15 | "PUBLIC",
16 | ],
17 | exported_deps = [
18 | "prelude//toolchains/android/src/com/facebook/buck/installer/proto:installer-model",
19 | "prelude//toolchains/android/third-party:grpc-netty-shaded",
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/manifest/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "manifest",
10 | srcs = glob(["*Test.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/android/manifest:manifest",
13 | "prelude//toolchains/android/third-party:guava",
14 | "prelude//toolchains/android/third-party:junit",
15 | "prelude//toolchains/android/third-party:tools-sdk-common",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/json/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "json",
10 | srcs = glob(["*Test.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
13 | "prelude//toolchains/android/src/com/facebook/buck/util/json:json",
14 | "prelude//toolchains/android/third-party:guava",
15 | "prelude//toolchains/android/third-party:junit",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/utils/actions.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | ActionExecutionAttributes = record(
10 | full_hybrid = field(bool, default = False),
11 | local_only = field(bool, default = False),
12 | prefer_local = field(bool, default = False),
13 | prefer_remote = field(bool, default = False),
14 | )
15 |
--------------------------------------------------------------------------------
/abi/constraints/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | # Used by open source projects to support `prelude//`
8 |
9 | constraint_setting(
10 | name = "abi",
11 | visibility = ["PUBLIC"],
12 | )
13 |
14 | constraint_value(
15 | name = "gnu",
16 | constraint_setting = ":abi",
17 | visibility = ["PUBLIC"],
18 | )
19 |
20 | constraint_value(
21 | name = "msvc",
22 | constraint_setting = ":abi",
23 | visibility = ["PUBLIC"],
24 | )
25 |
26 | constraint_value(
27 | name = "musl",
28 | constraint_setting = ":abi",
29 | visibility = ["PUBLIC"],
30 | )
31 |
--------------------------------------------------------------------------------
/erlang/toolchain/dependency_utils.erl:
--------------------------------------------------------------------------------
1 | %%% Copyright (c) Meta Platforms, Inc. and affiliates.
2 | %%%
3 | %%% This source code is licensed under both the MIT license found in the
4 | %%% LICENSE-MIT file in the root directory of this source tree and the Apache
5 | %%% License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | %%% of this source tree.
7 |
8 | %% @format
9 | -module(dependency_utils).
10 |
11 | -export([chars_to_binary/1]).
12 |
13 | -spec chars_to_binary(StringLike :: iodata()) -> binary().
14 | chars_to_binary(StringLike) ->
15 | case unicode:characters_to_binary(StringLike) of
16 | Bin when is_binary(Bin) -> Bin
17 | end.
18 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/relativepathmap/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "relativepathmap",
10 | srcs = glob(["*.java"]),
11 | visibility = ["PUBLIC"],
12 | deps = [
13 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
14 | "prelude//toolchains/android/src/com/facebook/buck/io/filesystem/impl:utils",
15 | "prelude//toolchains/android/third-party:guava",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/kotlin/kotlin_utils.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # kotlinc is strict about the target that you can pass, e.g.
10 | # error: unknown JVM target version: 8. Supported versions: 1.8, 9, 10, 11, 12
11 | def get_kotlinc_compatible_target(target: str) -> str:
12 | return "1.8" if target == "8" else target
13 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/common/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//kotlin/tools:defs.bzl", "kotlin_bootstrap_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | kotlin_bootstrap_library(
9 | name = "common",
10 | srcs = glob(["*.kt"]),
11 | tests = [
12 | "fbsource//fbandroid/javatests/com/facebook/kotlin/compilerplugins/kosabi/common:common",
13 | ],
14 | visibility = [
15 | "fbsource//fbandroid/javatests/...",
16 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/...",
17 | ],
18 | )
19 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/unit/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "standard_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | standard_java_test(
9 | name = "unit",
10 | deps = [
11 | "prelude//toolchains/android/src/com/facebook/buck/util/unit:unit",
12 | "prelude//toolchains/android/third-party:guava",
13 | "prelude//toolchains/android/third-party:jackson-databind",
14 | "prelude//toolchains/android/third-party:jsr305",
15 | "prelude//toolchains/android/third-party:junit",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/apple/tools/resource_broker/timeouts.py:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # pyre-strict
10 |
11 | DEFAULT_OPERATION_TIMEOUT = 10
12 |
13 | # Simulator boot is an expensive command and can take a long time to complete
14 | # depending on machine configuration and current machine load.
15 | SIMULATOR_BOOT_TIMEOUT = 90
16 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/installer/proto/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:protobuf.bzl", "protobuf_src_gen")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | protobuf_src_gen(
9 | name = "installer-model",
10 | srcs = [
11 | "install.proto",
12 | ],
13 | proto_path = [],
14 | deps = [
15 | "prelude//toolchains/android/third-party:jakarta.annotation-api",
16 | ],
17 | exported_deps = [
18 | "prelude//toolchains/android/third-party:protobuf",
19 | "prelude//toolchains/android/third-party:remote-apis",
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/proguard/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "translator",
10 | srcs = glob(["*.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/android/proguard:translator",
13 | "prelude//toolchains/android/src/com/facebook/buck/io/filesystem:filesystem",
14 | "prelude//toolchains/android/third-party:guava",
15 | "prelude//toolchains/android/third-party:junit",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/io/filesystem/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "filesystem",
10 | srcs = glob(["*.java"]),
11 | visibility = ["PUBLIC"],
12 | deps = [
13 | "prelude//toolchains/android/third-party:guava",
14 | ],
15 | exported_deps = [
16 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
17 | "prelude//toolchains/android/src/com/facebook/buck/io/file:file",
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting/ksic/KsicExperimentConstants.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.kotlin.abtesting.ksic
12 |
13 | const val UNIVERSE_NAME: String = "devx_ksic_universe"
14 | const val PARAM_KSIC_ENABLED: String = "ksic_enabled"
15 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/workertool/resources/proto/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:protobuf.bzl", "protobuf_src_gen")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | protobuf_src_gen(
9 | name = "worker-model",
10 | srcs = [
11 | "worker.proto",
12 | ],
13 | proto_path = [],
14 | deps = [
15 | "prelude//toolchains/android/third-party:jakarta.annotation-api",
16 | ],
17 | exported_deps = [
18 | "prelude//toolchains/android/third-party:protobuf",
19 | "prelude//toolchains/android/third-party:remote-apis",
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/io/pathformat/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "standard_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | standard_java_test(
9 | name = "pathformat",
10 | deps = [
11 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
12 | "prelude//toolchains/android/src/com/facebook/buck/io/pathformat:pathformat",
13 | "prelude//toolchains/android/src/com/facebook/buck/util/environment:platform",
14 | "prelude//toolchains/android/third-party:junit",
15 | ],
16 | )
17 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/plugin/adapter/TestTaskListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.plugin.adapter;
12 |
13 | public interface TestTaskListener {
14 | void started(String event);
15 |
16 | void finished(String event);
17 | }
18 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/abi/source/api/StopCompilation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.abi.source.api;
12 |
13 | /** Thrown by our ABI generating plugin to stop the compiler. */
14 | public class StopCompilation extends RuntimeException {}
15 |
--------------------------------------------------------------------------------
/kotlin/tools/kapt_base64_encoder/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//kotlin/tools:defs.bzl", "java_bootstrap_binary", "java_bootstrap_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("build_infra")
5 |
6 | source_listing()
7 |
8 | java_bootstrap_library(
9 | name = "kapt_base64_encoder_lib",
10 | srcs = [
11 | "com/facebook/kapt/KaptBase64Encoder.java",
12 | ],
13 | source = "11",
14 | target = "11",
15 | )
16 |
17 | java_bootstrap_binary(
18 | name = "kapt_base64_encoder",
19 | main_class = "com.facebook.kapt.KaptBase64Encoder",
20 | visibility = ["PUBLIC"],
21 | deps = [
22 | ":kapt_base64_encoder_lib",
23 | ],
24 | )
25 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/perf/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "perf",
10 | srcs = glob(["*.java"]),
11 | visibility = ["PUBLIC"],
12 | deps = [
13 | "prelude//toolchains/android/src/com/facebook/buck/core/util/log:log",
14 | "prelude//toolchains/android/src/com/facebook/buck/util:process_executor",
15 | "prelude//toolchains/android/third-party:guava",
16 | "prelude//toolchains/android/third-party:jsr305",
17 | ],
18 | )
19 |
--------------------------------------------------------------------------------
/decls/test_common.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//decls:toolchains_common.bzl", "toolchains_common")
10 |
11 | def _attributes() -> dict[str, Attr]:
12 | return {
13 | "_test_toolchain": toolchains_common.test_toolchain(),
14 | }
15 |
16 | test_common = struct(
17 | attributes = _attributes,
18 | )
19 |
--------------------------------------------------------------------------------
/matlab/matlab_toolchain.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load(":matlab_info.bzl", "MatlabToolchainInfo")
10 |
11 | def matlab_toolchain():
12 | return attrs.default_only(
13 | attrs.toolchain_dep(
14 | default = "toolchains//:matlab",
15 | providers = [MatlabToolchainInfo],
16 | ),
17 | )
18 |
--------------------------------------------------------------------------------
/android/min_sdk_version.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | _MIN_SDK_VERSION = 19
10 | _MAX_SDK_VERSION = 36
11 |
12 | def get_min_sdk_version_constraint_value_name(min_sdk: int) -> str:
13 | return "min_sdk_version_{}".format(min_sdk)
14 |
15 | def get_min_sdk_version_range() -> range:
16 | return range(_MIN_SDK_VERSION, _MAX_SDK_VERSION)
17 |
--------------------------------------------------------------------------------
/rust/rust_common.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load(":with_workspace.bzl", "package_key")
10 |
11 | def rust_common_macro_wrapper(rust_rule):
12 | def rust_common_impl(**kwargs):
13 | workspaces = read_package_value(package_key) or []
14 | rust_rule(_workspaces = workspaces, **kwargs)
15 |
16 | return rust_common_impl
17 |
--------------------------------------------------------------------------------
/rust/with_workspace.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | package_key = "rust.workspaces"
10 |
11 | def with_rust_workspace(targets):
12 | if isinstance(targets, str):
13 | targets = [targets]
14 |
15 | parent = read_parent_package_value(package_key) or []
16 | write_package_value(package_key, parent + targets, overwrite = True)
17 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/FileManagerListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java;
12 |
13 | import javax.tools.FileObject;
14 |
15 | interface FileManagerListener {
16 | void onFileRead(FileObject file);
17 |
18 | void onFileWritten(FileObject file);
19 | }
20 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/classes/ClasspathTraverser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.classes;
12 |
13 | import java.io.IOException;
14 |
15 | public interface ClasspathTraverser {
16 |
17 | void traverse(ClasspathTraversal traversal) throws IOException;
18 | }
19 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/version/utils/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "utils",
10 | srcs = glob(["*.java"]),
11 | # @oss-disable[end= ]: source = "8",
12 | # @oss-disable[end= ]: target = "8",
13 | source = "11", # @oss-enable
14 | target = "11", # @oss-enable
15 | visibility = [
16 | "PUBLIC",
17 | ],
18 | deps = [
19 | # Do NOT add any deps here. This library is used by code that cannot depend on the rest of Buck.
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/build_config/BUCK:
--------------------------------------------------------------------------------
1 | load(
2 | "@prelude//toolchains/android/tools:build_rules.bzl",
3 | "buck_java_test",
4 | )
5 | load("@prelude//utils:source_listing.bzl", "source_listing")
6 |
7 | oncall("android_devxx")
8 |
9 | source_listing()
10 |
11 | buck_java_test(
12 | name = "build_config",
13 | srcs = glob(["*.java"]),
14 | deps = [
15 | "prelude//toolchains/android/src/com/facebook/buck/android/build_config:build_config",
16 | "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
17 | "prelude//toolchains/android/third-party:guava",
18 | "prelude//toolchains/android/third-party:junit",
19 | ],
20 | )
21 |
--------------------------------------------------------------------------------
/apple/apple_app_intents.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def apple_app_intents_impl(_ctx: AnalysisContext) -> list[Provider]:
10 | """
11 | Implementation for apple_appintents rule.
12 | This is a bare-bones implementation that will be expanded as needed.
13 | """
14 |
15 | # TODO: Add actual implementation logic
16 | return []
17 |
--------------------------------------------------------------------------------
/apple/user/apple_macos_bundle.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//apple:apple_bundle.bzl", "apple_bundle_impl")
10 |
11 | def apple_macos_bundle_impl(ctx: AnalysisContext) -> list[Provider]:
12 | # This rule is _equivalent_ to `apple_bundle` except it applies
13 | # an incoming macOS transition.
14 | return apple_bundle_impl(ctx)
15 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/ksp/incremental/ReprocessReason.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.kotlin.ksp.incremental
12 |
13 | enum class ReprocessReason(val message: String) {
14 | CLASSPATH_CHANGED("Incremental processing after classpath change is not supported yet"),
15 | }
16 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/testdata/prebuilt/PrebuiltJunitMain.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | import org.junit.Test;
12 |
13 | public class PrebuiltJunitMain {
14 | public static void main(String[] args) {
15 | System.out.println(Test.class);
16 | System.out.println("ALL OK!");
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/apple/user/apple_watchos_bundle.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//apple:apple_bundle.bzl", "apple_bundle_impl")
10 |
11 | def apple_watchos_bundle_impl(ctx: AnalysisContext) -> list[Provider]:
12 | # This rule is _equivalent_ to `apple_bundle` except it applies
13 | # an incoming watchOS transition.
14 | return apple_bundle_impl(ctx)
15 |
--------------------------------------------------------------------------------
/go/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.python_bootstrap_binary(
10 | name = "gen_stdlib_importcfg",
11 | main = "gen_stdlib_importcfg.py",
12 | visibility = ["PUBLIC"],
13 | )
14 |
15 | prelude.python_bootstrap_binary(
16 | name = "go_wrapper_py",
17 | main = "go_wrapper.py",
18 | visibility = ["PUBLIC"],
19 | )
20 |
21 | prelude.go_stdlib(
22 | name = "stdlib",
23 | visibility = ["PUBLIC"],
24 | )
25 |
26 | prelude.go_bootstrap_binary(
27 | name = "tool_pack",
28 | build_args = [
29 | "cmd/pack",
30 | ],
31 | visibility = ["PUBLIC"],
32 | )
33 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/abi/source/api/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "api",
10 | srcs = glob(["*.java"]),
11 | visibility = [
12 | "PUBLIC",
13 | ],
14 | deps = [
15 | # Don't add deps that aren't already in the plugin; this is a super-light library
16 | "prelude//toolchains/android/src/com/facebook/buck/jvm/java/plugin/api:api",
17 | "prelude//toolchains/android/src/com/facebook/buck/util/liteinfersupport:liteinfersupport",
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/common/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "common",
10 | srcs = glob(["*.kt"]),
11 | labels = ["codegen_rule"],
12 | provided_deps = [
13 | "prelude//toolchains/android/third-party:kotlin-compiler",
14 | ],
15 | tests = [
16 | "fbsource//fbandroid/javatests/com/facebook/kotlin/compilerplugins/common:common",
17 | ],
18 | visibility = [
19 | "PUBLIC",
20 | ],
21 | deps = [
22 | ],
23 | )
24 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/ksp/incremental/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "incremental",
10 | srcs = glob(["**/*.kt"]),
11 | labels = ["codegen_rule"],
12 | visibility = [
13 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/...",
14 | "prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/...",
15 | ],
16 | deps = [
17 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Buck2 Prelude
2 |
3 | This repo contains a copy of the Buck2 Prelude, which is often included as a
4 | submodule with a Buck2 project. To obtain a copy of this repo, and set up other
5 | details of a Buck2, you should usually run `buck2 init --git`. Most information
6 | can be found on the main
7 | [Buck2 GitHub project](https://github.com/facebook/buck2).
8 |
9 | Pull requests and issues should be raised at
10 | [facebook/buck2](https://github.com/facebook/buck2) as that project is more
11 | closely monitored and contains CI checks.
12 |
13 | ## License
14 |
15 | Buck2 Prelude is both MIT and Apache License, Version 2.0 licensed, as found in
16 | the [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE) files.
17 |
--------------------------------------------------------------------------------
/rust/tools/cd_run.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
3 | #
4 | # This source code is dual-licensed under either the MIT license found in the
5 | # LICENSE-MIT file in the root directory of this source tree or the Apache
6 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | # of this source tree. You may select, at your option, one of the
8 | # above-listed licenses.
9 |
10 | # Changes directory and then runs a command
11 |
12 | import subprocess
13 | import sys
14 |
15 |
16 | def main():
17 | d = sys.argv[1]
18 | res = subprocess.run(sys.argv[2:], cwd=d)
19 | sys.exit(res.returncode)
20 |
21 |
22 | if __name__ == "__main__":
23 | main()
24 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/nio/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "standard_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | standard_java_test(
9 | name = "nio",
10 | deps = [
11 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
12 | "prelude//toolchains/android/src/com/facebook/buck/util:util",
13 | "prelude//toolchains/android/src/com/facebook/buck/util/nio:nio",
14 | "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
15 | "prelude//toolchains/android/third-party:junit",
16 | ],
17 | )
18 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/zip/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "zip",
10 | srcs = glob(["*.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
13 | "prelude//toolchains/android/src/com/facebook/buck/util/zip:zip",
14 | "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
15 | "prelude//toolchains/android/third-party:guava",
16 | "prelude//toolchains/android/third-party:junit",
17 | ],
18 | )
19 |
--------------------------------------------------------------------------------
/utils/strings.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def strip_prefix(prefix: str, s: str) -> [str, None]:
10 | """
11 | If the string `s` starts with `prefix`, return the result of stripping the
12 | latter from the former. Return `None` otherwise.
13 | """
14 |
15 | if s.startswith(prefix):
16 | return s[len(prefix):]
17 |
18 | return None
19 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/common/stub/model/Type.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.kotlin.compilerplugins.kosabi.common.stub.model
12 |
13 | interface Type {
14 | val names: List
15 | val pkg: List
16 | val nullable: Boolean
17 | val generics: List
18 | }
19 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/nio/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "nio",
10 | srcs = glob(["*.java"]),
11 | tests = [
12 | "prelude//toolchains/android/test/com/facebook/buck/util/nio:nio",
13 | ],
14 | visibility = ["PUBLIC"],
15 | deps = [
16 | "prelude//toolchains/android/src/com/facebook/buck/jvm/java/version/utils:utils",
17 | "prelude//toolchains/android/src/com/facebook/buck/util:util",
18 | "prelude//toolchains/android/third-party:guava",
19 | ],
20 | )
21 |
--------------------------------------------------------------------------------
/julia/julia_toolchain.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load(":julia_info.bzl", "JuliaToolchainInfo")
10 |
11 | def _toolchain(lang: str, providers: list[typing.Any]) -> Attr:
12 | return attrs.default_only(attrs.toolchain_dep(default = "toolchains//:" + lang, providers = providers))
13 |
14 | def julia_toolchain():
15 | return _toolchain("julia", [JuliaToolchainInfo])
16 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/core/filesystems/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "filesystems",
10 | srcs = glob(["*.java"]),
11 | tests = ["prelude//toolchains/android/test/com/facebook/buck/core/filesystems:filesystems"],
12 | visibility = [
13 | "prelude//toolchains/android/src/com/facebook/buck/...",
14 | "prelude//toolchains/android/test/...",
15 | ],
16 | deps = [
17 | # Do NOT add deps here. This library is loaded into the JVM bootstrap classloader in Java 9+.
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/apple/apple_package_config.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | IpaCompressionLevel = enum(
10 | "min",
11 | "max",
12 | "default",
13 | "none",
14 | )
15 |
16 | def apple_package_config() -> dict[str, typing.Any]:
17 | return {
18 | "_ipa_compression_level": read_root_config("apple", "ipa_compression_level", IpaCompressionLevel("default").value),
19 | }
20 |
--------------------------------------------------------------------------------
/apple/apple_sdk.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//apple:apple_toolchain_types.bzl", "AppleToolchainInfo")
10 |
11 | def get_apple_sdk_name(ctx: AnalysisContext) -> str:
12 | """
13 | Get the SDK defined on the toolchain.
14 | Will throw if the `_apple_toolchain` is not present.
15 | """
16 | return ctx.attrs._apple_toolchain[AppleToolchainInfo].sdk_name
17 |
--------------------------------------------------------------------------------
/python/tools/fail_with_message.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
3 | #
4 | # This source code is dual-licensed under either the MIT license found in the
5 | # LICENSE-MIT file in the root directory of this source tree or the Apache
6 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | # of this source tree. You may select, at your option, one of the
8 | # above-listed licenses.
9 |
10 | # pyre-strict
11 |
12 | import sys
13 | from pathlib import Path
14 |
15 |
16 | def main() -> None:
17 | print(Path(sys.argv[1]).read_text())
18 | if len(sys.argv) == 3:
19 | Path(sys.argv[2]).touch()
20 | sys.exit(1)
21 |
22 |
23 | if __name__ == "__main__":
24 | main()
25 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/classes/AbstractFileLike.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.classes;
12 |
13 | public abstract class AbstractFileLike implements FileLike {
14 |
15 | @Override
16 | public String toString() {
17 | return getRelativePath() + " (in " + getContainer() + ")";
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/test/selectors/Nullable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.test.selectors;
12 |
13 | /**
14 | * Defining @Nullable locally here because we cannot import javax.annotation.Nullable; according to
15 | * comment in src/com/facebook/buck/test/selectors/BUCK
16 | */
17 | public @interface Nullable {}
18 |
--------------------------------------------------------------------------------
/apple/apple_stripping.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//cxx:cxx_context.bzl", "get_cxx_toolchain_info")
10 |
11 | def apple_strip_args(ctx: AnalysisContext) -> cmd_args:
12 | cxx_toolchain_info = get_cxx_toolchain_info(ctx)
13 | flags = cxx_toolchain_info.strip_flags_info.strip_non_global_flags
14 | return cmd_args(flags) if flags != None else cmd_args(["-x", "-T"])
15 |
--------------------------------------------------------------------------------
/linking/types.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # Ways a library can request to be linked (e.g. usually specific via a rule
10 | # param like `preferred_linkage`). The actual link style used for a library is
11 | # usually determined by a combination of this and the link style being exported
12 | # via a provider.
13 | Linkage = enum(
14 | "any",
15 | "static",
16 | "shared",
17 | )
18 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/testresultsoutput/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "standard_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | standard_java_test(
9 | name = "testresultsoutput",
10 | vm_args = [
11 | # Needed for "fbsource//third-party/java/system-rules:system-rules"
12 | "--add-opens=java.base/java.util=ALL-UNNAMED",
13 | ],
14 | deps = [
15 | "prelude//toolchains/android/src/com/facebook/buck/testresultsoutput:testresultsoutput",
16 | "prelude//toolchains/android/third-party:junit",
17 | "prelude//toolchains/android/third-party:system-rules",
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/utils/source_listing.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load(":source_listing_impl.bzl", "SourceListingInfoAlias", "empty_source_listing_impl", "source_listing_impl")
10 |
11 | SourceListingInfo = SourceListingInfoAlias
12 |
13 | def source_listing(exclude = None):
14 | source_listing_impl(exclude = exclude or [])
15 |
16 | def empty_source_listing():
17 | empty_source_listing_impl()
18 |
--------------------------------------------------------------------------------
/runtime/constraints/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | # Used by open source projects to support `prelude//`
8 |
9 | constraint_setting(
10 | name = "test_runtime",
11 | visibility = ["PUBLIC"],
12 | )
13 |
14 | constraint_value(
15 | name = "android-host-test",
16 | constraint_setting = ":test_runtime",
17 | visibility = ["PUBLIC"],
18 | )
19 |
20 | constraint_value(
21 | name = "android-unit-test",
22 | constraint_setting = ":test_runtime",
23 | visibility = ["PUBLIC"],
24 | )
25 |
26 | constraint_value(
27 | name = "android-instrumentation-test",
28 | constraint_setting = ":test_runtime",
29 | visibility = ["PUBLIC"],
30 | )
31 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/test/result/type/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "type",
10 | srcs = glob(["*.java"]),
11 | # This target gets pulled in by ideabuck, which can't move to Java 11 yet, so explicitly target 8.
12 | # @oss-disable[end= ]: source = "8",
13 | # @oss-disable[end= ]: target = "8",
14 | source = "11", # @oss-enable
15 | target = "11", # @oss-enable
16 | visibility = [
17 | "PUBLIC",
18 | ],
19 | deps = [], # This list is to remain empty. See src/com/facebook/buck/testrunner/BUCK.
20 | )
21 |
--------------------------------------------------------------------------------
/java/dex_toolchain.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # TODO(T107163344) These should be part of the Android toolchain!
10 | # Move out once we have overlays.
11 | DexToolchainInfo = provider(
12 | doc = "Dex toolchain info",
13 | fields = {
14 | "android_jar": provider_field(typing.Any, default = None),
15 | "d8_command": provider_field(typing.Any, default = None),
16 | },
17 | )
18 |
--------------------------------------------------------------------------------
/matlab/matlab.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load(":matlab_program.bzl", "matlab_program_impl")
10 | load(":matlab_toolchain.bzl", "matlab_toolchain")
11 |
12 | implemented_rules = {
13 | "matlab_program": matlab_program_impl,
14 | }
15 |
16 | extra_attributes = {
17 | "matlab_program": {
18 | "main": attrs.source(),
19 | "_matlab_toolchain": matlab_toolchain(),
20 | },
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/OptionsConsumer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java;
12 |
13 | import java.util.Collection;
14 |
15 | public interface OptionsConsumer {
16 | void addOptionValue(String option, String value);
17 |
18 | void addFlag(String flagName);
19 |
20 | void addExtras(Collection extras);
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/android/resources/filter/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "filter",
10 | srcs = glob(["*.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/android/resources/filter:filter",
13 | "prelude//toolchains/android/src/com/facebook/buck/io/filesystem:filesystem",
14 | "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
15 | "prelude//toolchains/android/third-party:guava",
16 | "prelude//toolchains/android/third-party:junit",
17 | ],
18 | )
19 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/plugin/api/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "api",
10 | srcs = glob(["*.java"]),
11 | visibility = [
12 | "PUBLIC",
13 | ],
14 | deps = [
15 | "prelude//toolchains/android/src/com/facebook/buck/jvm/java/lang/model:model",
16 | "prelude//toolchains/android/src/com/facebook/buck/util/liteinfersupport:liteinfersupport",
17 |
18 | # Don't add deps that aren't already in the plugin; this is a super-light library that can be
19 | # used outside of Buck
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/cli/bootstrapper/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "bootstrapper-util",
10 | srcs = glob(["*Test.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/cli/bootstrapper:bootstrapper_lib",
13 | "prelude//toolchains/android/third-party:junit",
14 | ":bootstrapper-util-lib",
15 | ],
16 | )
17 |
18 | buck_java_library(
19 | name = "bootstrapper-util-lib",
20 | srcs = glob(
21 | ["*.java"],
22 | exclude = ["*Test.java"],
23 | ),
24 | )
25 |
--------------------------------------------------------------------------------
/user/rule_spec.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | RuleRegistrationSpec = record(
10 | name = field(str),
11 | impl = field(typing.Callable),
12 | attrs = field(dict[str, Attr]),
13 | # TODO(nga): should be `transition | None`, but `transition` does not work as type.
14 | cfg = field(typing.Any | None, None),
15 | is_toolchain_rule = field(bool, False),
16 | doc = field(str, ""),
17 | )
18 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/common/stub/model/KPropertyStub.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.kotlin.compilerplugins.kosabi.common.stub.model
12 |
13 | open class KPropertyStub(val name: String, val value: String?, val args: List = emptyList()) {
14 | var ret: Type = KType.UNIT
15 | var static: Boolean = false
16 | }
17 |
--------------------------------------------------------------------------------
/apple/apple_modular_utility.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # We use a fixed module cache location. This works around issues with
10 | # multi-user setups with MobileOnDemand and allows us to share the
11 | # module cache with Xcode, LLDB and arc focus.
12 | #
13 | # TODO(T123737676): This needs to be changed to use $TMPDIR in a
14 | # wrapper for modular clang compilation.
15 | MODULE_CACHE_PATH = "/tmp/buck-module-cache"
16 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/logger/noop/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "noop",
10 | srcs = glob(["**/*.kt"]),
11 | labels = ["codegen_rule"],
12 | resources = glob(["resources/**/*"]),
13 | resources_root = "resources",
14 | visibility = [
15 | "PUBLIC",
16 | ],
17 | deps = [
18 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/logger:logger",
19 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/logger/model:model",
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/apple/apple_package_types.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | ApplePackageInfo = provider(
10 | fields = {
11 | "dsyms": provider_field(list[Artifact]),
12 | "extension": provider_field(str),
13 | "info_plist": provider_field(Artifact),
14 | "linker_maps": provider_field(list[Artifact]),
15 | "name": provider_field(str),
16 | "package": provider_field(Artifact),
17 | },
18 | )
19 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/android/apkmodule/HasBuildTargetAndBuildDeps.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.android.apkmodule;
12 |
13 | import java.util.Set;
14 |
15 | /** Some object that has a build target. */
16 | public interface HasBuildTargetAndBuildDeps {
17 | BuildTarget getBuildTarget();
18 |
19 | Set getBuildDeps();
20 | }
21 |
--------------------------------------------------------------------------------
/toolchains/no_toolchain.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def _no_toolchain(_ctx: AnalysisContext) -> list[Provider]:
10 | return [DefaultInfo()]
11 |
12 | # no_toolchain doesn't return any *ToolchainInfo providers
13 | # it's useful when a toolchain is optional, e.q. CxxToolchain for Python and Go rules.
14 | no_toolchain = rule(
15 | impl = _no_toolchain,
16 | attrs = {},
17 | is_toolchain_rule = True,
18 | )
19 |
--------------------------------------------------------------------------------
/utils/arglike.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # Command-line argument-like. For example, a string, or an artifact.
10 | # Precise list is defined in `ValueAsCommandLineLike::as_command_line`.
11 | # Defining as Any, but can be defined as union type,
12 | # but that might be expensive to check at runtime.
13 | # In the future we will have compiler-time only types,
14 | # and this type could be refined.
15 | ArgLike = typing.Any
16 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting/ExperimentConfig.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.kotlin.abtesting
12 |
13 | interface ExperimentConfig {
14 |
15 | fun getBoolParam(param: String, default: Boolean): Boolean
16 |
17 | fun getIntParam(param: String, default: Int): Int
18 |
19 | fun getStringParam(param: String, default: String): String
20 | }
21 |
--------------------------------------------------------------------------------
/apple/apple_resource_utility.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load(":apple_bundle_destination.bzl", "AppleBundleDestination")
10 | load(
11 | ":apple_resource_types.bzl",
12 | "AppleResourceDestination", # @unused Used as a type
13 | )
14 |
15 | def apple_bundle_destination_from_resource_destination(res_destination: AppleResourceDestination) -> AppleBundleDestination:
16 | return AppleBundleDestination(res_destination.value)
17 |
--------------------------------------------------------------------------------
/apple/swift/swift_sdk_flags.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//utils:arglike.bzl", "ArgLike")
10 | load(":swift_toolchain.bzl", "get_swift_toolchain_info")
11 |
12 | def get_sdk_flags(ctx: AnalysisContext) -> list[ArgLike]:
13 | swift_toolchain_info = get_swift_toolchain_info(ctx)
14 | if swift_toolchain_info.sdk_path:
15 | return ["-sdk", swift_toolchain_info.sdk_path]
16 | else:
17 | return []
18 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/io/file/PathMatcher.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.io.file;
12 |
13 | import com.facebook.buck.core.filesystems.RelPath;
14 | import java.nio.file.Path;
15 |
16 | /** A contract for matching {@link Path}s. */
17 | public interface PathMatcher {
18 |
19 | /** Check if given path matches pattern. */
20 | boolean matches(RelPath path);
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting/noop/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "noop",
10 | srcs = glob(["**/*.kt"]),
11 | labels = ["codegen_rule"],
12 | resources = glob(["resources/**/*"]),
13 | resources_root = "resources",
14 | visibility = [
15 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/...",
16 | "prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/...",
17 | ],
18 | deps = [
19 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting:abtesting",
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/stubsgen/standalone/KosabiConfig.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.kotlin.compilerplugins.kosabi.stubsgen.standalone
12 |
13 | import java.io.File
14 |
15 | class KosabiConfig(
16 | val sourceRoots: List,
17 | val classpath: List,
18 | val outputDir: File,
19 | val logEnabled: Boolean,
20 | )
21 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/kotlinc/incremental/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "incremental",
10 | srcs = glob(["**/*.kt"]),
11 | extra_kotlinc_arguments = ["-Xopt-in=kotlin.ExperimentalStdlibApi"],
12 | labels = ["codegen_rule"],
13 | visibility = [
14 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/...",
15 | "prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/...",
16 | ],
17 | deps = [
18 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
19 | ],
20 | )
21 |
--------------------------------------------------------------------------------
/tools/audit_providers_universe.bxl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | def _impl(ctx):
10 | ts = ctx.target_universe(ctx.cli_args.universe).lookup(ctx.cli_args.target)
11 | ctx.output.print(pstr({t: a.providers() for t, a in ctx.analysis(ts).items()}))
12 |
13 | run = bxl_main(
14 | impl = _impl,
15 | cli_args = {
16 | "target": cli_args.target_label(),
17 | "universe": cli_args.target_label(),
18 | },
19 | )
20 |
--------------------------------------------------------------------------------
/erlang/common_test/test_binary/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | erlang_application(
8 | name = "test_binary",
9 | srcs = glob([
10 | "src/*.erl",
11 | "src/*.hrl",
12 | ]),
13 | applications = [
14 | "kernel",
15 | "stdlib",
16 | "syntax_tools",
17 | "prelude//erlang/common_test/common:common",
18 | "prelude//erlang/common_test/cth_hooks:cth_hooks",
19 | "prelude//erlang/common_test/test_exec:test_exec",
20 | ],
21 | erl_opts = [
22 | "+debug_info",
23 | "+warnings_as_errors",
24 | ],
25 | includes = glob(["include/*.hrl"]),
26 | use_global_parse_transforms = False,
27 | visibility = ["PUBLIC"],
28 | )
29 |
--------------------------------------------------------------------------------
/go/tools/gobuckify/BUCK:
--------------------------------------------------------------------------------
1 | # @oss-disable[end= ]: load("@fbcode_macros//build_defs:go_binary.bzl", "go_binary")
2 | # @oss-disable[end= ]: load("@fbcode_macros//build_defs:go_unittest.bzl", "go_unittest")
3 | load("@prelude//utils:source_listing.bzl", "source_listing")
4 |
5 | oncall("golang")
6 |
7 | source_listing()
8 |
9 | prelude = native # @oss-enable
10 | go_binary = prelude.go_binary # @oss-enable
11 | go_unittest = prelude.go_unittest # @oss-enable
12 |
13 | go_binary(
14 | name = "gobuckify",
15 | srcs = glob(
16 | ["*.go"],
17 | exclude = ["*_test.go"],
18 | ),
19 | visibility = ["PUBLIC"],
20 | )
21 |
22 | go_unittest(
23 | name = "gobuckify_test",
24 | srcs = glob(["*_test.go"]),
25 | target_under_test = ":gobuckify",
26 | visibility = ["PUBLIC"],
27 | )
28 |
--------------------------------------------------------------------------------
/apple/apple_rules_impl.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | # @oss-disable[end= ]: load("@prelude//apple/meta_only:meta_only_rules.bzl", "meta_only_apple_rule_attributes", "meta_only_apple_rule_implementations")
10 |
11 | implemented_rules = {
12 | # @oss-disable[end= ]: } | meta_only_apple_rule_implementations()
13 | } # @oss-enable
14 |
15 | extra_attributes = {
16 | # @oss-disable[end= ]: } | meta_only_apple_rule_attributes()
17 | } # @oss-enable
18 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/cd/CompileStepsBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.cd;
12 |
13 | import com.facebook.buck.step.isolatedsteps.IsolatedStep;
14 | import com.google.common.collect.ImmutableList;
15 |
16 | /** Builder for java compilation steps. */
17 | public interface CompileStepsBuilder {
18 |
19 | ImmutableList buildIsolatedSteps();
20 | }
21 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/abi/source/ArtificialAnnotationValue.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.abi.source;
12 |
13 | import javax.lang.model.element.AnnotationValue;
14 |
15 | /**
16 | * Interface for {@link AnnotationValue}s that are implemented by something other than javac itself.
17 | */
18 | interface ArtificialAnnotationValue extends AnnotationValue {}
19 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/abi/testdata/descriptor_and_signature_factories/Dependency.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.foo;
12 |
13 | public class Dependency {
14 | public class Inner {
15 | public class Innerer {}
16 | }
17 |
18 | public class NonGenericInner {
19 | public class GenericInnerer {}
20 | }
21 |
22 | public class GenericInner {}
23 | }
24 |
--------------------------------------------------------------------------------
/java/utils/java_more_utils.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//os_lookup:defs.bzl", "Os", "OsLookup")
10 | load("@prelude//utils:expect.bzl", "expect")
11 |
12 | def get_path_separator_for_exec_os(ctx: AnalysisContext) -> str:
13 | expect(hasattr(ctx.attrs, "_exec_os_type"), "Expect ctx.attrs._exec_os_type is defined.")
14 | is_windows = ctx.attrs._exec_os_type[OsLookup].os == Os("windows")
15 | return ";" if is_windows else ":"
16 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/JavacVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java;
12 |
13 | import com.facebook.buck.core.util.immutables.BuckStyleValue;
14 |
15 | @BuckStyleValue
16 | abstract class JavacVersion {
17 |
18 | public abstract String getVersionString();
19 |
20 | @Override
21 | public String toString() {
22 | return getVersionString();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/abi/source/ArtificialQualifiedNameable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.abi.source;
12 |
13 | import javax.lang.model.element.QualifiedNameable;
14 |
15 | /** Interface for {@link QualifiedNameable}s that are implemented by something other than javac. */
16 | interface ArtificialQualifiedNameable extends QualifiedNameable, ArtificialElement {}
17 |
--------------------------------------------------------------------------------
/apple/apple_library_types.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load(
10 | "@prelude//:artifact_tset.bzl",
11 | "ArtifactTSet",
12 | )
13 |
14 | AppleLibraryInfo = provider(
15 | fields = {
16 | "labels": list[str],
17 | "provider_type": provider_field(str, default = "AppleLibraryInfo"),
18 | "public_framework_headers": ArtifactTSet,
19 | "swift_header": [Artifact, None],
20 | "target": Label,
21 | },
22 | )
23 |
--------------------------------------------------------------------------------
/platforms/apple/sdk.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | _APPLE_SDKS = [
10 | "iphoneos",
11 | "iphonesimulator",
12 | "maccatalyst",
13 | "macosx",
14 | "visionos",
15 | "visionsimulator",
16 | "watchos",
17 | "watchsimulator",
18 | # Marker entry used to help toolchain selectors define a set of
19 | # tools outside the apple_toolchain definition.
20 | "toolchain-tool",
21 | ]
22 |
23 | AppleSdk = enum(*_APPLE_SDKS)
24 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/abi/source/ArtificialAnnotationMirror.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.abi.source;
12 |
13 | import javax.lang.model.element.AnnotationMirror;
14 |
15 | /**
16 | * Interface for {@link AnnotationMirror}s that are implemented by something other than javac
17 | * itself.
18 | */
19 | interface ArtificialAnnotationMirror extends AnnotationMirror {}
20 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/logger/model/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "model",
10 | srcs = glob([
11 | "**/*.kt",
12 | "**/*.java",
13 | ]),
14 | labels = ["codegen_rule"], # see: https://fburl.com/workplace/fhud6fe6
15 | visibility = [
16 | "prelude//toolchains/android/meta_only/src/com/facebook/buck/jvm/kotlin/cd/logger/...",
17 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/...",
18 | "prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/cd/analytics/...",
19 | ],
20 | )
21 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/common/stub/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "stub",
10 | srcs = glob(
11 | ["**/*.kt"],
12 | ),
13 | labels = ["codegen_rule"],
14 | provided_deps = [
15 | "prelude//toolchains/android/third-party:kotlin-compiler-embeddable",
16 | ],
17 | visibility = [
18 | "PUBLIC",
19 | ],
20 | deps = [
21 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/common:common",
22 | "prelude//toolchains/android/third-party:kotlin-poet",
23 | ],
24 | )
25 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/compilerplugins/kosabi/stubsgen/util/FTQCollection.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.kotlin.compilerplugins.kosabi.stubsgen.util
12 |
13 | interface FTQCollection {
14 | /**
15 | * Returns all FullTypeQualifier objects in this collection.
16 | *
17 | * @return A collection of FullTypeQualifier objects
18 | */
19 | fun all(): Collection
20 | }
21 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/runner/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "standard_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | standard_java_test(
9 | name = "runner",
10 | deps = [
11 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
12 | "prelude//toolchains/android/src/com/facebook/buck/jvm/java/runner:runner",
13 | "prelude//toolchains/android/src/com/facebook/buck/jvm/java/version/utils:utils",
14 | "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
15 | "prelude//toolchains/android/third-party:guava",
16 | "prelude//toolchains/android/third-party:junit",
17 | ],
18 | )
19 |
--------------------------------------------------------------------------------
/apple/tools/resource_broker/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | python_binary(
8 | name = "resource_broker",
9 | main = "main.py",
10 | visibility = ["PUBLIC"],
11 | deps = [
12 | ":main",
13 | ],
14 | )
15 |
16 | python_library(
17 | name = "main",
18 | srcs = ["main.py"],
19 | deps = [
20 | ":lib",
21 | ],
22 | )
23 |
24 | python_library(
25 | name = "lib",
26 | srcs = glob(
27 | [
28 | "*.py",
29 | ],
30 | exclude = [
31 | "main.py",
32 | ],
33 | ),
34 | deps = [
35 | "fbsource//third-party/pypi/dataclasses-json:dataclasses-json",
36 | "fbsource//third-party/pypi/packaging:packaging",
37 | ],
38 | )
39 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/core/util/log/appendablelogrecord/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "appendablelogrecord",
10 | srcs = glob(["*.java"]),
11 | # This target is pulled in by testrunner, which needs to compile against Java 8.
12 | # @oss-disable[end= ]: source = "8",
13 | # @oss-disable[end= ]: target = "8",
14 | source = "11", # @oss-enable
15 | target = "11", # @oss-enable
16 | visibility = [
17 | "prelude//toolchains/android/src/com/facebook/buck/core/util/log:log",
18 | "prelude//toolchains/android/src/com/facebook/buck/testrunner:junit",
19 | ],
20 | )
21 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/plugin/api/PluginClassLoaderFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.plugin.api;
12 |
13 | import javax.tools.JavaCompiler;
14 |
15 | /** Factory interface for {@link PluginClassLoader}s for different compiler instances */
16 | public interface PluginClassLoaderFactory {
17 | PluginClassLoader getPluginClassLoader(JavaCompiler.CompilationTask task);
18 | }
19 |
--------------------------------------------------------------------------------
/toolchains/genrule.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//:genrule_toolchain.bzl", "GenruleToolchainInfo")
10 |
11 | def _system_genrule_toolchain_impl(_ctx):
12 | return [
13 | DefaultInfo(),
14 | GenruleToolchainInfo(
15 | zip_scrubber = None,
16 | ),
17 | ]
18 |
19 | system_genrule_toolchain = rule(
20 | impl = _system_genrule_toolchain_impl,
21 | attrs = {},
22 | is_toolchain_rule = True,
23 | )
24 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/android/AndroidInstallPrinter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.android;
12 |
13 | /** Interface for logging android installs in the AdbHelper */
14 | public interface AndroidInstallPrinter {
15 | void printMessage(String message);
16 |
17 | void printSuccess(String message);
18 |
19 | void printWarning(String message);
20 |
21 | void printError(String message);
22 | }
23 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/plugin/adapter/BuckJavacPlugin.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.plugin.adapter;
12 |
13 | /**
14 | * Analogue to javac 8's {@link com.sun.source.util.Plugin} class for use within Buck, even on older
15 | * versions of javac.
16 | */
17 | public interface BuckJavacPlugin {
18 | String getName();
19 |
20 | void init(BuckJavacTask task, String... args);
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/zip/ZipCompressionLevel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.util.zip;
12 |
13 | public enum ZipCompressionLevel {
14 | NONE(0),
15 | MIN(1),
16 | DEFAULT(6),
17 | MAX(9),
18 | ;
19 |
20 | private final int value;
21 |
22 | ZipCompressionLevel(int value) {
23 | this.value = value;
24 | }
25 |
26 | public int getValue() {
27 | return value;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/go_bootstrap/tools/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("build_infra")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.go_bootstrap_binary(
10 | name = "go_concat_files",
11 | srcs = prelude.glob(["**/*"]),
12 | build_args = [
13 | "go/concat_files.go",
14 | ],
15 | visibility = ["PUBLIC"],
16 | )
17 |
18 | prelude.go_bootstrap_binary(
19 | name = "go_go_wrapper",
20 | srcs = prelude.glob(["**/*"]),
21 | build_args = [
22 | "go/go_wrapper.go",
23 | ],
24 | visibility = ["PUBLIC"],
25 | )
26 |
27 | prelude.go_bootstrap_binary(
28 | name = "go_testmaingen",
29 | srcs = prelude.glob(["**/*"]),
30 | build_args = [
31 | "go/testmaingen.go",
32 | ],
33 | visibility = [
34 | "PUBLIC",
35 | ],
36 | )
37 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/plugin/api/PluginClassLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.plugin.api;
12 |
13 | import com.facebook.buck.util.liteinfersupport.Nullable;
14 |
15 | /** Utility interface for loading classes that live in Buck's Java compiler plugin. */
16 | public interface PluginClassLoader {
17 | @Nullable
18 | Class extends T> loadClass(String name, Class superclass);
19 | }
20 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/cd/BuildCommandStepsBuilder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.cd;
12 |
13 | import com.facebook.buck.core.filesystems.AbsPath;
14 | import com.facebook.buck.step.isolatedsteps.IsolatedStep;
15 | import com.google.common.collect.ImmutableList;
16 |
17 | public interface BuildCommandStepsBuilder {
18 |
19 | ImmutableList getSteps();
20 |
21 | AbsPath getRuleCellRoot();
22 | }
23 |
--------------------------------------------------------------------------------
/cxx/dist_lto/tools/dist_lto_copy.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
3 | #
4 | # This source code is dual-licensed under either the MIT license found in the
5 | # LICENSE-MIT file in the root directory of this source tree or the Apache
6 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | # of this source tree. You may select, at your option, one of the
8 | # above-listed licenses.
9 |
10 | import argparse
11 | import shutil
12 | import sys
13 | from typing import List
14 |
15 |
16 | def main(argv: List[str]) -> int:
17 | parser = argparse.ArgumentParser()
18 | parser.add_argument("--to")
19 | parser.add_argument("--from", dest="from_")
20 | args = parser.parse_args(argv[1:])
21 | shutil.copy(args.from_, args.to)
22 | return 0
23 |
24 |
25 | sys.exit(main(sys.argv))
26 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/android/apkmodule/TargetGraphInterface.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.android.apkmodule;
12 |
13 | /**
14 | * Interface for a directed graph of targets that can be traversed by getting the dependencies of
15 | * each node.
16 | */
17 | public interface TargetGraphInterface {
18 | boolean isEmpty();
19 |
20 | HasBuildTargetAndBuildDeps get(BuildTarget buildTarget);
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/abi/source/ArtificialPackageElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.abi.source;
12 |
13 | import javax.lang.model.element.PackageElement;
14 |
15 | /**
16 | * Interface for {@link PackageElement}s that are implemented by something other than javac itself.
17 | */
18 | interface ArtificialPackageElement
19 | extends PackageElement, ArtificialElement, ArtificialQualifiedNameable {}
20 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/zip/collect/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "standard_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | standard_java_test(
9 | name = "collect",
10 | with_test_data = True,
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
13 | "prelude//toolchains/android/src/com/facebook/buck/util/zip/collect:collect",
14 | "prelude//toolchains/android/test/com/facebook/buck/testutil:testutil",
15 | "prelude//toolchains/android/test/com/facebook/buck/testutil/integration:util",
16 | "prelude//toolchains/android/third-party:guava",
17 | "prelude//toolchains/android/third-party:junit",
18 | ],
19 | )
20 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/cd/analytics/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "analytics",
10 | srcs = glob(["**/*.kt"]),
11 | extra_kotlinc_arguments = ["-Xopt-in=kotlin.ExperimentalStdlibApi"],
12 | labels = ["codegen_rule"],
13 | tests = ["prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/cd/analytics/logger:logger"],
14 | visibility = [
15 | "PUBLIC",
16 | ],
17 | deps = [
18 | "prelude//toolchains/android/src/com/facebook/buck/core/filesystems:filesystems",
19 | "prelude//toolchains/android/src/com/facebook/buck/jvm/cd/command/kotlin:language-version",
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/cxx/platform.bzl:
--------------------------------------------------------------------------------
1 | # Copyright (c) Meta Platforms, Inc. and affiliates.
2 | #
3 | # This source code is dual-licensed under either the MIT license found in the
4 | # LICENSE-MIT file in the root directory of this source tree or the Apache
5 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
6 | # of this source tree. You may select, at your option, one of the
7 | # above-listed licenses.
8 |
9 | load("@prelude//cxx:cxx_toolchain_types.bzl", "CxxPlatformInfo")
10 | load("@prelude//utils:platform_flavors_util.bzl", "by_platform")
11 |
12 | def cxx_by_platform(cxx_platform_info: CxxPlatformInfo, xs: list[(str, typing.Any)]) -> list[typing.Any]:
13 | platform_flavors = [cxx_platform_info.name]
14 | if cxx_platform_info.deps_aliases:
15 | platform_flavors.extend(cxx_platform_info.deps_aliases)
16 | return by_platform(platform_flavors, xs)
17 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/cd/serialization/SerializationUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.cd.serialization;
12 |
13 | /** CD serialization utilities. */
14 | public class SerializationUtil {
15 |
16 | private SerializationUtil() {}
17 |
18 | public static RuntimeException createNotSupportedException(Enum> value) {
19 | return new IllegalStateException(value.name() + " enum value is not supported!");
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/abi/source/CompletedTypeKind.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.abi.source;
12 |
13 | public enum CompletedTypeKind {
14 | COMPLETED_TYPE,
15 | PARTIALLY_COMPLETED_TYPE,
16 | ERROR_TYPE,
17 | CRASH;
18 |
19 | public CompletedTypeKind merge(CompletedTypeKind other) {
20 | if (this.compareTo(other) >= 0) {
21 | return this;
22 | }
23 |
24 | return other;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/abi/source/api/SourceCodeWillNotCompileException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.abi.source.api;
12 |
13 | /**
14 | * Thrown when a source ABI cannot be generated because the source code will not compile. Correct
15 | * handling is to simply stop attempting to generate the ABI and allow the compiler to fail.
16 | */
17 | public class SourceCodeWillNotCompileException extends RuntimeException {}
18 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/liteinfersupport/Nullable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.util.liteinfersupport;
12 |
13 | /**
14 | * Some projects like FatJar is going to be embedded in many targets, it cannot have external
15 | * dependencies, but we'd like to have {@link javax.annotation.Nullable} and {@link
16 | * com.google.common.base.Preconditions#checkNotNull} anyway, so we define these here.
17 | */
18 | public @interface Nullable {}
19 |
--------------------------------------------------------------------------------
/toolchains/android/third-party/aosp/SignedJarBuilder.patch:
--------------------------------------------------------------------------------
1 | diff --git a/third-party/java/aosp/src/com/android/common/sdklib/internal/build/SignedJarBuilder.java b/third-party/java/aosp/src/com/android/common/sdklib/internal/build/SignedJarBuilder.java
2 | index b3883fa532..8209c4d9c7 100644
3 | --- a/third-party/java/aosp/src/com/android/common/sdklib/internal/build/SignedJarBuilder.java
4 | +++ b/third-party/java/aosp/src/com/android/common/sdklib/internal/build/SignedJarBuilder.java
5 | @@ -124,7 +124,7 @@ public class SignedJarBuilder {
6 | public SignedJarBuilder(OutputStream out, PrivateKey key, X509Certificate certificate)
7 | throws IOException, NoSuchAlgorithmException {
8 | mOutputJar = new JarOutputStream(new BufferedOutputStream(out));
9 | - mOutputJar.setLevel(9);
10 | + mOutputJar.setLevel(4);
11 | mKey = key;
12 | mCertificate = certificate;
13 |
--------------------------------------------------------------------------------
/go/tools/gopackagesdriver/driver/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//utils:source_listing.bzl", "source_listing")
2 |
3 | oncall("golang")
4 |
5 | source_listing()
6 |
7 | prelude = native
8 |
9 | prelude.go_library(
10 | name = "driver",
11 | srcs = glob(
12 | ["*.go"],
13 | exclude = ["*_test.go"],
14 | ),
15 | visibility = ["PUBLIC"],
16 | deps = [
17 | # @oss-disable[end= ]: "fbcode//third-party-go/vendor/golang.org/x/tools/go/packages:packages",
18 | "prelude//go/tools/gopackagesdriver/third-party:golang.org/x/tools/go/packages", # @oss-enable
19 | ],
20 | )
21 |
22 | prelude.go_test(
23 | name = "driver_test",
24 | srcs = glob(["*_test.go"]),
25 | # @oss-disable[end= ]: env = {"GO_TEST2JSON_TOOL": "$(exe_target fbsource//third-party/go:test2json)"},
26 | target_under_test = ":driver",
27 | visibility = ["PUBLIC"],
28 | )
29 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/zip/collect/OnDuplicateEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.util.zip.collect;
12 |
13 | /** Action to take when a duplicate entry is encountered when building a zip file. */
14 | public enum OnDuplicateEntry {
15 | /** Fail fast. */
16 | FAIL,
17 | /** An entry is overwritten. Last entry wins. */
18 | OVERWRITE,
19 | /** All entries are stored in the archive including the duplicates. */
20 | APPEND,
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting/noop/NoopExperimentConfigService.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.kotlin.abtesting.noop
12 |
13 | import com.facebook.buck.jvm.kotlin.abtesting.ExperimentConfig
14 | import com.facebook.buck.jvm.kotlin.abtesting.ExperimentConfigService
15 |
16 | class NoopExperimentConfigService : ExperimentConfigService {
17 | override fun loadConfig(universeName: String): ExperimentConfig = NoopExperimentConfig
18 | }
19 |
--------------------------------------------------------------------------------
/apple/tools/code_signing_using_manifest/code_signing.dotslash.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env fbpython
2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
3 | #
4 | # This source code is dual-licensed under either the MIT license found in the
5 | # LICENSE-MIT file in the root directory of this source tree or the Apache
6 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | # of this source tree. You may select, at your option, one of the
8 | # above-listed licenses.
9 |
10 | import dotslash
11 |
12 | dotslash.export_multi_platform_python(
13 | target="prelude//apple/tools/code_signing_using_manifest:codesign_bundle_using_manifest",
14 | install_platforms={
15 | dotslash.InstallPlatform.MAC_AARCH64,
16 | dotslash.InstallPlatform.MAC_X86_64,
17 | },
18 | destination_files=["code_signing_using_manifest"],
19 | oncall="apple_workflows",
20 | )
21 |
--------------------------------------------------------------------------------
/go/tools/gopackagesdriver/main.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package main
12 |
13 | import (
14 | "context"
15 | "log/slog"
16 | "os"
17 |
18 | "go/tools/gopackagesdriver/driver"
19 | )
20 |
21 | func main() {
22 | ctx, cancel := context.WithCancel(context.Background())
23 | defer cancel()
24 |
25 | err := driver.Run(ctx, driver.WithTelemetry(&driver.NoopTelemetry{}))
26 | if err != nil {
27 | slog.Error("error with input", "args", os.Args[1:], "err", err)
28 | os.Exit(1)
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ide_integrations/apple/build_index/BUCK:
--------------------------------------------------------------------------------
1 | # @lint-ignore BUCKLINT missing-oncall-call-severe This file is unowned -
2 |
3 | # DO NOT EDIT THIS FILE WITHOUT ADDING AN ONCALL - YOUR CHANGES
4 |
5 | # WILL BE DELETED. UNLESS THERE IS AN ONCALL ADDED THIS FILE WILL BE
6 |
7 | # DELETED WITHOUT NOTICE - DO NOT DEPEND ON IT.
8 | load("@prelude//utils:source_listing.bzl", "source_listing")
9 |
10 | source_listing()
11 |
12 | python_bootstrap_binary(
13 | name = "build_index_store",
14 | main = "main.py",
15 | visibility = [
16 | "fbcode//glean/glass/test/regression:swift-binary",
17 | "fbcode//glean/glass/test/regression:swift-objc-xlang-binary",
18 | "fbcode//glean/lang/swift/tests:tests",
19 | "fbcode//glean/lang/swift/tests:tests-rust-indexer",
20 | ],
21 | deps = [
22 | "prelude//apple/tools/index:merge_index_store_lib",
23 | ],
24 | )
25 |
--------------------------------------------------------------------------------
/toolchains/android/meta_only/src/com/facebook/buck/jvm/kotlin/abtesting/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("kotlin_foundation_oncall")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "abtesting",
10 | srcs = glob(["**/*.kt"]),
11 | resources = glob(["resources/**/*"]),
12 | resources_root = "resources",
13 | visibility = [
14 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/...",
15 | "prelude//toolchains/android/test/com/facebook/buck/jvm/kotlin/...",
16 | ],
17 | deps = [
18 | "prelude//toolchains/android/meta_only/src/com/facebook/buck/jvm/kotlin/abtesting/qe2:qe2",
19 | "prelude//toolchains/android/src/com/facebook/buck/jvm/kotlin/abtesting:abtesting",
20 | ],
21 | )
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/core/build/execution/context/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_kotlin_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_kotlin_library(
9 | name = "context",
10 | srcs = glob(["*.kt"]),
11 | visibility = [
12 | "PUBLIC",
13 | ],
14 | deps = [
15 | "prelude//toolchains/android/third-party:guava",
16 | ],
17 | exported_deps = [
18 | "prelude//toolchains/android/src/com/facebook/buck/io/filesystem:filesystem",
19 | "prelude//toolchains/android/src/com/facebook/buck/util:process_executor",
20 | "prelude//toolchains/android/src/com/facebook/buck/util:util",
21 | "prelude//toolchains/android/src/com/facebook/buck/util/environment:platform",
22 | ],
23 | )
24 |
--------------------------------------------------------------------------------
/rust/tools/redirect_stdout.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
3 | #
4 | # This source code is dual-licensed under either the MIT license found in the
5 | # LICENSE-MIT file in the root directory of this source tree or the Apache
6 | # License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | # of this source tree. You may select, at your option, one of the
8 | # above-listed licenses.
9 |
10 | # Wrapper around `cargo llvm-lines` that redirects stdout to a file
11 |
12 | import subprocess
13 | import sys
14 |
15 |
16 | def main():
17 | if len(sys.argv) < 3:
18 | raise ValueError("expected at least 2 arguments")
19 | out = sys.argv[1]
20 | with open(out, "w") as f:
21 | res = subprocess.run(sys.argv[2:], stdout=f)
22 | sys.exit(res.returncode)
23 |
24 |
25 | if __name__ == "__main__":
26 | main()
27 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/test/selectors/TestSelectorParseException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.test.selectors;
12 |
13 | /** Errors specific to parsing test selectors. */
14 | public class TestSelectorParseException extends RuntimeException {
15 | public TestSelectorParseException(String message) {
16 | super(message);
17 | }
18 |
19 | public TestSelectorParseException(String message, Exception cause) {
20 | super(message, cause);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/stepsbuilder/javacd/worker/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools/build_rules:worker.bzl", "worker")
2 | load("@prelude//utils:buckconfig.bzl", "read", "read_list")
3 | load("@prelude//utils:source_listing.bzl", "source_listing")
4 |
5 | oncall("android_devxx")
6 |
7 | source_listing()
8 |
9 | worker(
10 | name = "javacd_grpc_worker_tool",
11 | concurrency = 16,
12 | exe = "prelude//toolchains/android/src/com/facebook/buck/jvm/java/stepsbuilder/javacd/main:javacd_tool",
13 | jvm_args = read_list(
14 | "javacd",
15 | "jvm_args",
16 | delimiter = " ",
17 | required = False,
18 | ) or [] if not read("javacd", "jvm_args_target") else [],
19 | main_class = "com.facebook.buck.jvm.java.stepsbuilder.javacd.main.JavaCDGrpcWorkerToolMain",
20 | visibility = [
21 | "PUBLIC",
22 | ],
23 | )
24 |
--------------------------------------------------------------------------------
/ide_integrations/visual_studio/BUCK:
--------------------------------------------------------------------------------
1 | # @no-autodeps
2 |
3 | load("@prelude//utils:source_listing.bzl", "source_listing")
4 |
5 | oncall("windows_devx")
6 |
7 | source_listing()
8 |
9 | filegroup(
10 | name = "vsgo_bxl",
11 | srcs = glob(["**/*.bxl"]),
12 | visibility = ["PUBLIC"],
13 | )
14 |
15 | export_file(
16 | name = "absolutize_path_exe",
17 | src = "msvs/absolutize_path.exe",
18 | mode = "reference",
19 | visibility = ["PUBLIC"],
20 | )
21 |
22 | export_file(
23 | name = "vs_buck_build_props",
24 | src = "msvs/vs_buck_build.props",
25 | mode = "reference",
26 | visibility = ["PUBLIC"],
27 | )
28 |
29 | python_library(
30 | name = "vsgo_lib",
31 | srcs = ["vsgo.py"],
32 | visibility = ["PUBLIC"],
33 | )
34 |
35 | python_binary(
36 | name = "vsgo",
37 | main_module = ".vsgo",
38 | deps = [
39 | ":vsgo_lib",
40 | ],
41 | )
42 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/cd/CompileStepsBuilderFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.cd;
12 |
13 | /** Factory that creates {@link CompileStepsBuilder} instances */
14 | public interface CompileStepsBuilderFactory {
15 |
16 | /** Creates an appropriate {@link LibraryStepsBuilder} instance */
17 | LibraryStepsBuilder getLibraryBuilder();
18 |
19 | /** Creates an appropriate {@link AbiStepsBuilder} instance */
20 | AbiStepsBuilder getAbiBuilder();
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/cd/serialization/PathSerializer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.cd.serialization;
12 |
13 | import java.nio.file.Path;
14 | import java.nio.file.Paths;
15 |
16 | /** {@link Path} to protobuf serializer */
17 | public class PathSerializer {
18 |
19 | private PathSerializer() {}
20 |
21 | /** Deserializes javacd model into {@link Path}. */
22 | public static Path deserialize(String path) {
23 | return Paths.get(path);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/erlang/erlang_ls.config:
--------------------------------------------------------------------------------
1 | {
2 | "include_dirs": [
3 | "./common_test",
4 | "./common_test/*/include",
5 | "./common_test/*/src"
6 | ],
7 | "apps_dirs": [
8 | "./common_test/*"
9 | ],
10 | "compiler_telemetry_enabled": true,
11 | "deps_dirs": [
12 | "../../third-party/vendor/*"
13 | ],
14 | "diagnostics": {
15 | "disabled": [
16 | "crossref",
17 | "dialyzer",
18 | "elvis"
19 | ],
20 | "enabled": [
21 | "edoc"
22 | ]
23 | },
24 | "incremental_sync": true,
25 | "lenses": {
26 | "disabled": [
27 | "suggest-spec",
28 | "function-references"
29 | ],
30 | "enabled": [
31 | "server-info"
32 | ]
33 | },
34 | "macros": [
35 | {
36 | "name": "TEST"
37 | }
38 | ]
39 | }
40 |
--------------------------------------------------------------------------------
/rust/custom-targets/targets/riscv64imacf-unknown-none-elf.json:
--------------------------------------------------------------------------------
1 | {
2 | "arch": "riscv64",
3 | "code-model": "medium",
4 | "cpu": "generic-rv64",
5 | "crt-objects-fallback": "false",
6 | "data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
7 | "eh-frame-header": false,
8 | "emit-debug-gdb-scripts": false,
9 | "features": "+m,+a,+c,+f",
10 | "linker": "rust-lld",
11 | "linker-flavor": "gnu-lld",
12 | "llvm-abiname": "lp64f",
13 | "llvm-target": "riscv64",
14 | "max-atomic-width": 64,
15 | "metadata": {
16 | "description": "Bare RISC-V (RV64IMAC ISA)",
17 | "host_tools": false,
18 | "std": false,
19 | "tier": 2
20 | },
21 | "panic-strategy": "abort",
22 | "relocation-model": "static",
23 | "supported-sanitizers": [
24 | "shadow-call-stack",
25 | "kernel-address"
26 | ],
27 | "target-pointer-width": 64
28 | }
29 |
--------------------------------------------------------------------------------
/third-party/hmaptool/README.md:
--------------------------------------------------------------------------------
1 | # hmaptool
2 |
3 | This tool was copied from llvm-project. See https://github.com/llvm/llvm-project/blob/main/clang/utils/hmaptool/hmaptool
4 |
5 | ## About
6 |
7 | Header maps are binary files used by Xcode, which are used to map
8 | header names or paths to other locations. Clang has support for
9 | those since its inception, but there's not a lot of header map
10 | testing around.
11 |
12 | Since it's a binary format, testing becomes pretty much brittle
13 | and its hard to even know what's inside if you don't have the
14 | appropriate tools.
15 |
16 | Add a python based tool that allows creating and dumping header
17 | maps based on a json description of those. While here, rewrite
18 | tests to use the tool and remove the binary files from the tree.
19 |
20 | This tool was initially written by Daniel Dunbar.
21 |
22 | Thanks to Stella Stamenova for helping make this work on Windows.
23 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/java/classes/DefaultClasspathTraverser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.classes;
12 |
13 | import java.io.IOException;
14 |
15 | /**
16 | * @see ClasspathTraversal
17 | */
18 | public class DefaultClasspathTraverser implements ClasspathTraverser {
19 |
20 | public DefaultClasspathTraverser() {}
21 |
22 | @Override
23 | public void traverse(ClasspathTraversal traversal) throws IOException {
24 | traversal.traverse();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/jvm/java/abi/source/AnnotationWithSingleClassForTreeBackedTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.java.abi.source;
12 |
13 | public @interface AnnotationWithSingleClassForTreeBackedTest {
14 | Class> single();
15 |
16 | String SOURCE_CODE =
17 | "package com.facebook.buck.jvm.java.abi.source;\n"
18 | + "public @interface AnnotationWithSingleClassForTreeBackedTest {\n"
19 | + "Class> single();\n"
20 | + "}";
21 | }
22 |
--------------------------------------------------------------------------------
/toolchains/android/test/com/facebook/buck/util/environment/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_test")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_test(
9 | name = "environment",
10 | srcs = glob(["*Test.java"]),
11 | deps = [
12 | "prelude//toolchains/android/src/com/facebook/buck/util:process_executor",
13 | "prelude//toolchains/android/src/com/facebook/buck/util/environment:environment",
14 | "prelude//toolchains/android/src/com/facebook/buck/util/environment:platform",
15 | "prelude//toolchains/android/test/com/facebook/buck/util:testutil",
16 | "prelude//toolchains/android/third-party:guava",
17 | "prelude//toolchains/android/third-party:jsr305",
18 | "prelude//toolchains/android/third-party:junit",
19 | ],
20 | )
21 |
--------------------------------------------------------------------------------
/rust/custom-targets/targets/riscv64imacfv-unknown-none-elf.json:
--------------------------------------------------------------------------------
1 | {
2 | "arch": "riscv64",
3 | "code-model": "medium",
4 | "cpu": "generic-rv64",
5 | "crt-objects-fallback": "false",
6 | "data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
7 | "eh-frame-header": false,
8 | "emit-debug-gdb-scripts": false,
9 | "features": "+m,+a,+c,+f,+v",
10 | "linker": "rust-lld",
11 | "linker-flavor": "gnu-lld",
12 | "llvm-abiname": "lp64f",
13 | "llvm-target": "riscv64",
14 | "max-atomic-width": 64,
15 | "metadata": {
16 | "description": "Bare RISC-V (RV64IMACFV ISA)",
17 | "host_tools": false,
18 | "std": false,
19 | "tier": 2
20 | },
21 | "panic-strategy": "abort",
22 | "relocation-model": "static",
23 | "supported-sanitizers": [
24 | "shadow-call-stack",
25 | "kernel-address"
26 | ],
27 | "target-pointer-width": 64
28 | }
29 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/io/filesystem/impl/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | UTILS_SRCS = [
9 | "ProjectFilesystemUtils.java",
10 | ]
11 |
12 | buck_java_library(
13 | name = "utils",
14 | srcs = UTILS_SRCS,
15 | visibility = [
16 | "PUBLIC",
17 | ],
18 | deps = [
19 | "prelude//toolchains/android/src/com/facebook/buck/io/file:file",
20 | "prelude//toolchains/android/src/com/facebook/buck/io/windowsfs:windowsfs",
21 | "prelude//toolchains/android/third-party:guava",
22 | "prelude//toolchains/android/third-party:jsr305",
23 | ],
24 | exported_deps = [
25 | "prelude//toolchains/android/src/com/facebook/buck/io/filesystem:filesystem",
26 | ],
27 | )
28 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/jvm/kotlin/buildtools/SharedApiClassesClassLoaderProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.jvm.kotlin.buildtools
12 |
13 | import org.jetbrains.kotlin.buildtools.api.ExperimentalBuildToolsApi
14 | import org.jetbrains.kotlin.buildtools.api.SharedApiClassesClassLoader
15 |
16 | @OptIn(ExperimentalBuildToolsApi::class)
17 | internal object SharedApiClassesClassLoaderProvider {
18 | val sharedApiClassesClassLoader: ClassLoader = SharedApiClassesClassLoader()
19 | }
20 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/test/selectors/BUCK:
--------------------------------------------------------------------------------
1 | load("@prelude//toolchains/android/tools:build_rules.bzl", "buck_java_library")
2 | load("@prelude//utils:source_listing.bzl", "source_listing")
3 |
4 | oncall("android_devxx")
5 |
6 | source_listing()
7 |
8 | buck_java_library(
9 | name = "selectors",
10 | srcs = glob(["*.java"]),
11 | required_for_source_only_abi = True,
12 | # This target is pulled in by testrunner, which needs to compile against Java 8.
13 | # @oss-disable[end= ]: source = "8",
14 | # @oss-disable[end= ]: target = "8",
15 | source = "11", # @oss-enable
16 | target = "11", # @oss-enable
17 | tests = [
18 | "prelude//toolchains/android/test/com/facebook/buck/test/selectors:selectors",
19 | ],
20 | visibility = [
21 | "PUBLIC",
22 | ],
23 | deps = [], # This list is to remain empty. See src/com/facebook/buck/testrunner/BUCK.
24 | )
25 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/util/zip/BestCompressionGZIPOutputStream.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.util.zip;
12 |
13 | import java.io.IOException;
14 | import java.io.OutputStream;
15 | import java.util.zip.GZIPOutputStream;
16 |
17 | public class BestCompressionGZIPOutputStream extends GZIPOutputStream {
18 |
19 | public BestCompressionGZIPOutputStream(OutputStream out, boolean syncFlush) throws IOException {
20 | super(out, syncFlush);
21 | def.setLevel(9);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/toolchains/android/src/com/facebook/buck/core/filesystems/AbsPathImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Meta Platforms, Inc. and affiliates.
3 | *
4 | * This source code is dual-licensed under either the MIT license found in the
5 | * LICENSE-MIT file in the root directory of this source tree or the Apache
6 | * License, Version 2.0 found in the LICENSE-APACHE file in the root directory
7 | * of this source tree. You may select, at your option, one of the
8 | * above-listed licenses.
9 | */
10 |
11 | package com.facebook.buck.core.filesystems;
12 |
13 | import java.nio.file.Path;
14 |
15 | /** Implementation of {@link com.facebook.buck.core.filesystems.AbsPath} */
16 | class AbsPathImpl extends PathWrapperImpl implements AbsPath {
17 | public AbsPathImpl(Path path) {
18 | super(path);
19 | if (!path.isAbsolute()) {
20 | throw new IllegalArgumentException("path must be absolute: " + path);
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------