Skip to content

Commit

Permalink
prelude: Source listing for the entire prelude
Browse files Browse the repository at this point in the history
Summary:
This is a bit ugly, but it's not obvious how to do it better right now, planning to post about that.

Anyway, discussed with Stiopa, no easy clearly-better ideas at this time.

Reviewed By: stepancheg

Differential Revision: D55792095

fbshipit-source-id: 40333b21ed354a0bfa671787737cf688c97f10fb
  • Loading branch information
JakobDegen authored and facebook-github-bot committed May 1, 2024
1 parent e9d9728 commit e877b2e
Show file tree
Hide file tree
Showing 50 changed files with 274 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BUCK
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load(":native.bzl", prelude = "native")

oncall("build_infra")

source_listing()

# Done to avoid triggering a lint rule that replaces glob with an fbcode macro
globby = glob

Expand Down
6 changes: 6 additions & 0 deletions abi/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

config_setting(
name = "gnu",
constraint_values = [
Expand Down
6 changes: 6 additions & 0 deletions abi/constraints/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

# Used by open source projects to support `prelude//`

constraint_setting(
Expand Down
5 changes: 5 additions & 0 deletions android/constraints/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
load("@prelude//android:min_sdk_version.bzl", "get_min_sdk_version_constraint_value_name", "get_min_sdk_version_range")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native # Avoid warnings and auto-formatters

Expand Down
6 changes: 6 additions & 0 deletions android/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native # Avoid warnings and auto-formatters

prelude.python_bootstrap_binary(
Expand Down
6 changes: 6 additions & 0 deletions apple/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

apple_tools(
name = "apple-tools",
adhoc_codesign_tool = None # @oss-enable
Expand Down
5 changes: 5 additions & 0 deletions apple/tools/bundling/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load("@prelude//apple/tools/defs.bzl", "meta_python_test")

oncall("build_infra")

source_listing()

python_binary(
name = "assemble_bundle",
main = "main.py",
Expand Down
5 changes: 5 additions & 0 deletions apple/tools/code_signing/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load("@prelude//apple/tools/defs.bzl", "meta_python_test")

oncall("build_infra")

source_listing()

python_library(
name = "lib",
srcs = glob(
Expand Down
5 changes: 5 additions & 0 deletions apple/tools/info_plist_processor/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load("@prelude//apple/tools/defs.bzl", "meta_python_test")

oncall("build_infra")

source_listing()

python_library(
name = "preprocess",
srcs = ["preprocess.py"],
Expand Down
4 changes: 4 additions & 0 deletions apple/tools/re_compatibility_utils/BUCK
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native

prelude.python_library(
Expand Down
6 changes: 6 additions & 0 deletions apple/tools/resource_broker/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

python_binary(
name = "resource_broker",
main = "main.py",
Expand Down
5 changes: 5 additions & 0 deletions apple/tools/selective_debugging/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load("@prelude//apple/tools/defs.bzl", "meta_python_test")

oncall("build_infra")

source_listing()

python_library(
name = "lib",
srcs = [
Expand Down
6 changes: 6 additions & 0 deletions cpu/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

config_setting(
name = "x86_64",
constraint_values = [
Expand Down
6 changes: 6 additions & 0 deletions cpu/constraints/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

# Used by open source projects to support `prelude//`

constraint_setting(
Expand Down
5 changes: 5 additions & 0 deletions cxx/dist_lto/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
load("@prelude//cxx/dist_lto:tools.bzl", "dist_lto_tools")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native

Expand Down
5 changes: 5 additions & 0 deletions cxx/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load(":defs.bzl", "cxx_hacks")

oncall("build_infra")

source_listing()

prelude = native

prelude.python_bootstrap_binary(
Expand Down
5 changes: 5 additions & 0 deletions erlang/applications/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
load("@prelude//erlang:erlang_otp_application.bzl", "gen_otp_applications")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

gen_otp_applications()
6 changes: 6 additions & 0 deletions erlang/common_test/common/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

erlang_application(
name = "common",
srcs = glob([
Expand Down
6 changes: 6 additions & 0 deletions erlang/common_test/cth_hooks/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

erlang_application(
name = "cth_hooks",
srcs = glob([
Expand Down
6 changes: 6 additions & 0 deletions erlang/common_test/test_binary/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

erlang_escript(
name = "escript",
emu_args = [
Expand Down
6 changes: 6 additions & 0 deletions erlang/common_test/test_cli_lib/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

erlang_application(
name = "test_cli_lib",
srcs = glob(["src/*.erl"]),
Expand Down
6 changes: 6 additions & 0 deletions erlang/common_test/test_exec/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

erlang_application(
name = "test_exec",
srcs = glob([
Expand Down
6 changes: 6 additions & 0 deletions erlang/shell/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

erlang_application(
name = "buck2_shell_utils",
srcs = glob(["src/*.erl"]),
Expand Down
5 changes: 5 additions & 0 deletions erlang/toolchain/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
load("@prelude//erlang:erlang_toolchain.bzl", "erlang_parse_transform", "toolchain_resources_internal", "toolchain_utilities")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

erlang_parse_transform(
name = "transform_project_root",
Expand Down
6 changes: 6 additions & 0 deletions git/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native

prelude.python_bootstrap_binary(
Expand Down
5 changes: 5 additions & 0 deletions go/constraints/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load(":defs.bzl", "generate_tag_constraints")

oncall("build_infra")

source_listing()

constraint_setting(
name = "cgo_enabled",
visibility = ["PUBLIC"],
Expand Down
6 changes: 6 additions & 0 deletions go/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native

prelude.python_bootstrap_binary(
Expand Down
6 changes: 6 additions & 0 deletions haskell/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native

prelude.python_bootstrap_binary(
Expand Down
5 changes: 5 additions & 0 deletions http_archive/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load("@prelude//http_archive/exec_deps.bzl", "http_archive_exec_deps")

oncall("build_infra")

source_listing()

prelude = native

http_archive_exec_deps(
Expand Down
6 changes: 6 additions & 0 deletions java/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native

prelude.python_bootstrap_binary(
Expand Down
6 changes: 6 additions & 0 deletions julia/tools/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native

prelude.python_bootstrap_binary(
Expand Down
6 changes: 6 additions & 0 deletions kotlin/tools/compile_kotlin/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native

prelude.python_bootstrap_binary(
Expand Down
5 changes: 5 additions & 0 deletions kotlin/tools/kapt_base64_encoder/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
load("@prelude//kotlin/tools:defs.bzl", "java_bootstrap_binary", "java_bootstrap_library")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

java_bootstrap_library(
name = "kapt_base64_encoder_lib",
Expand Down
6 changes: 6 additions & 0 deletions os/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

prelude = native # Avoid warnings and auto-formatters

# The short list of ubiquitous, mainstream operating systems:
Expand Down
6 changes: 6 additions & 0 deletions os/constraints/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("build_infra")

source_listing()

# Used by open source projects to support `prelude//`

constraint_setting(
Expand Down
5 changes: 5 additions & 0 deletions os_lookup/targets/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load("//os_lookup:defs.bzl", "os_lookup")

oncall("build_infra")

source_listing()

os_lookup(
name = "os_lookup",
cpu = select({
Expand Down
4 changes: 4 additions & 0 deletions platforms/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
# This file exports a sub-set of the definitions from TARGETS.v2 for backwards-compatibility with buck1.
# NOTE: These have no effect in BUCK1 and are only provided so imports can resolve.

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

oncall("build_infra")

source_listing()

config_setting(
name = "runs_remote",
visibility = ["PUBLIC"],
Expand Down
5 changes: 5 additions & 0 deletions platforms/BUCK.v2
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Used by open source projects to provide a simple platform setting

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

oncall("build_infra")

source_listing()

prelude = native

execution_platform(
Expand Down
Loading

0 comments on commit e877b2e

Please sign in to comment.