Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: flake update #4625

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1,730 changes: 1,005 additions & 725 deletions Cargo.lock

Large diffs are not rendered by default.

27 changes: 12 additions & 15 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
inputs.nixpkgs.follows = "nixpkgs";
};
};

Expand All @@ -26,7 +23,7 @@
overlays = [
(self: super: {
nodejs = super.nodejs_20;
pnpm = super.nodePackages.pnpm;
pnpm = super.pnpm;
})
(import rust-overlay)
];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"engines": {
"node": "20",
"pnpm": "8"
"pnpm": "9"
},
"resolutions": {
"@types/ws": "^8.5.12",
Expand Down
11 changes: 0 additions & 11 deletions prelude/.buckconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@ prelude = .
# but our custom config format (yuk) doesn't accept inline comments.
# Therefore, we hide the name of the group when not open source.

[not_repositories] # @oss-enable
fbcode = ../..
fbsource = ../../..
ovr_config = ../../../arvr/tools/build_defs/config
bazel_skylib = ../../../third-party/bazel-skylib
fbcode_macros = ../../../tools/build_defs/fbcode_macros
fbobjc_dylibs = ../../../tools/build_defs/fbobjc_dylibs
buck = ../../../xplat/build_infra/buck_client
buck_bazel_skylib = ../../../xplat/build_infra/buck_client/third-party/skylark/bazel-skylib
toolchains = ../toolchains

[repository_aliases]
[not_repository_aliases] # @oss-enable
config = ovr_config
Expand Down
15 changes: 14 additions & 1 deletion prelude/BUCK
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
load("@prelude//utils:source_listing.bzl", "source_listing")
load(":native.bzl", prelude = "native")

oncall("build_infra")

source_listing(exclude = [
# Exclude PACKAGE file using modifiers since those are not enabled everywhere yet.
"PACKAGE",
])

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

srcs = globby(
["**"],
# Context: https://fb.workplace.com/groups/buck2users/posts/3121903854732641/
exclude = ["**/.pyre_configuration.local"],
exclude = [
"**/.pyre_configuration.local",
# Unfortunately, using modifiers require loading bzl files in outside of prelude,
# and that currently breaks isolated tests that attempt to grab a best-effort prelude
# from the filegroup below.
# TODO: Switch these tests to use the bundled prelude instead.
"PACKAGE",
],
)

# Re-export filegroups that are behind package boundary violations for
Expand Down
6 changes: 6 additions & 0 deletions prelude/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 prelude/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
9 changes: 6 additions & 3 deletions prelude/android/aapt2_link.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_aapt2_link(
no_resource_removal: bool,
should_keep_raw_values: bool,
package_id_offset: int,
resource_stable_ids: [Artifact, None],
resource_stable_ids: Artifact | None,
preferred_density: [str, None],
filter_locales: bool,
locales: list[str],
Expand Down Expand Up @@ -117,8 +117,11 @@ def get_aapt2_link(

aapt2_compile_rules_args_file = ctx.actions.write("{}/aapt2_compile_rules_args_file".format(identifier), cmd_args(aapt2_compile_rules, delimiter = " "))
aapt2_command.add("-R")
aapt2_command.add(cmd_args(aapt2_compile_rules_args_file, format = "@{}"))
aapt2_command.hidden(aapt2_compile_rules)
aapt2_command.add(cmd_args(
aapt2_compile_rules_args_file,
format = "@{}",
hidden = aapt2_compile_rules,
))

aapt2_command.add(additional_aapt2_params)

Expand Down
53 changes: 48 additions & 5 deletions prelude/android/android.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,38 @@ FORCE_SINGLE_CPU = read_root_config("buck2", "android_force_single_cpu") in ("Tr
FORCE_SINGLE_DEFAULT_CPU = read_root_config("buck2", "android_force_single_default_cpu") in ("True", "true")
DISABLE_STRIPPING = read_root_config("android", "disable_stripping") in ("True", "true")

# Format is {"ovveride_name": {"re_cap_key": "re_cap_value"}}; for example:
# {
# "dynamic-listing": {
# "platform": "riot",
# "pool": "EUREKA_POOL",
# },
# "test-execution": {
# "platform": "riot",
# "pool": "EUREKA_POOL",
# },
# }
_RE_CAPS = attrs.option(attrs.dict(key = attrs.string(), value = attrs.dict(key = attrs.string(), value = attrs.string())), default = None)

# Format is {"ovveride_name": "re_use_case"}; for example:
# {
# "dynamic-listing": "riot",
# "test-execution": "riot",
# }
_RE_USE_CASE = attrs.option(attrs.dict(key = attrs.string(), value = attrs.string()), default = None)

extra_attributes = {
"android_aar": {
"abi_generation_mode": attrs.option(attrs.enum(AbiGenerationMode), default = None),
"compress_asset_libraries": attrs.default_only(attrs.bool(default = False)),
"cpu_filters": attrs.list(attrs.enum(TargetCpuType), default = ALL_CPU_FILTERS),
"deps": attrs.list(attrs.split_transition_dep(cfg = cpu_split_transition), default = []),
"javac": attrs.option(attrs.one_of(attrs.exec_dep(), attrs.source()), default = None),
"min_sdk_version": attrs.option(attrs.int(), default = None),
"native_library_merge_glue": attrs.option(attrs.split_transition_dep(cfg = cpu_split_transition), default = None),
"native_library_merge_linker_args": attrs.option(attrs.dict(key = attrs.string(), value = attrs.list(attrs.arg())), default = None),
"package_asset_libraries": attrs.default_only(attrs.bool(default = True)),
"package_asset_libraries": attrs.bool(default = True),
"package_resources": attrs.bool(default = True),
"relinker_extra_deps": attrs.list(attrs.split_transition_dep(cfg = cpu_split_transition), default = []),
"resources_root": attrs.option(attrs.string(), default = None),
"strip_libraries": attrs.default_only(attrs.bool(default = not DISABLE_STRIPPING)),
"_android_toolchain": toolchains_common.android(),
Expand All @@ -83,6 +104,7 @@ extra_attributes = {
},
"android_binary": {
"aapt_mode": attrs.enum(AaptMode, default = "aapt1"), # Match default in V1
"application_module_blacklist": attrs.option(attrs.list(attrs.transition_dep(cfg = cpu_transition)), default = None),
"application_module_configs": attrs.dict(key = attrs.string(), value = attrs.list(attrs.transition_dep(cfg = cpu_transition)), sorted = False, default = {}),
"build_config_values_file": attrs.option(attrs.one_of(attrs.transition_dep(cfg = cpu_transition), attrs.source()), default = None),
"constraint_overrides": attrs.list(attrs.string(), default = []),
Expand All @@ -96,6 +118,7 @@ extra_attributes = {
"native_library_merge_code_generator": attrs.option(attrs.exec_dep(), default = None),
"native_library_merge_glue": attrs.option(attrs.split_transition_dep(cfg = cpu_split_transition), default = None),
"native_library_merge_linker_args": attrs.option(attrs.dict(key = attrs.string(), value = attrs.list(attrs.arg())), default = None),
"relinker_extra_deps": attrs.list(attrs.split_transition_dep(cfg = cpu_split_transition), default = []),
"strip_libraries": attrs.bool(default = not DISABLE_STRIPPING),
"_android_toolchain": toolchains_common.android(),
"_cxx_toolchain": attrs.split_transition_dep(cfg = cpu_split_transition, default = "toolchains//:android-hack"),
Expand All @@ -115,6 +138,7 @@ extra_attributes = {
},
"android_bundle": {
"aapt_mode": attrs.enum(AaptMode, default = "aapt1"), # Match default in V1
"application_module_blacklist": attrs.option(attrs.list(attrs.transition_dep(cfg = cpu_transition)), default = None),
"application_module_configs": attrs.dict(key = attrs.string(), value = attrs.list(attrs.transition_dep(cfg = cpu_transition)), sorted = False, default = {}),
"build_config_values_file": attrs.option(attrs.one_of(attrs.transition_dep(cfg = cpu_transition), attrs.source()), default = None),
"deps": attrs.list(attrs.split_transition_dep(cfg = cpu_split_transition), default = []),
Expand All @@ -127,6 +151,8 @@ extra_attributes = {
"native_library_merge_code_generator": attrs.option(attrs.exec_dep(), default = None),
"native_library_merge_glue": attrs.option(attrs.split_transition_dep(cfg = cpu_split_transition), default = None),
"native_library_merge_linker_args": attrs.option(attrs.dict(key = attrs.string(), value = attrs.list(attrs.arg())), default = None),
"relinker_extra_deps": attrs.list(attrs.split_transition_dep(cfg = cpu_split_transition), default = []),
"use_derived_apk": attrs.bool(default = False),
"_android_toolchain": toolchains_common.android(),
"_cxx_toolchain": attrs.split_transition_dep(cfg = cpu_split_transition, default = "toolchains//:android-hack"),
"_dex_toolchain": toolchains_common.dex(),
Expand All @@ -151,24 +177,35 @@ extra_attributes = {
"native_library_merge_sequence": attrs.option(attrs.list(attrs.any()), default = None),
"_android_toolchain": toolchains_common.android(),
"_dex_toolchain": toolchains_common.dex(),
"_exec_os_type": buck.exec_os_type_arg(),
"_is_building_android_binary": attrs.default_only(attrs.bool(default = True)),
"_is_force_single_cpu": attrs.default_only(attrs.bool(default = FORCE_SINGLE_CPU)),
"_is_force_single_default_cpu": attrs.default_only(attrs.bool(default = FORCE_SINGLE_DEFAULT_CPU)),
"_java_toolchain": toolchains_common.java_for_android(),
},
"android_instrumentation_test": {
"instrumentation_test_listener": attrs.option(attrs.source(), default = None),
"extra_instrumentation_args": attrs.option(attrs.dict(key = attrs.string(), value = attrs.arg()), default = None),
"instrumentation_test_listener": attrs.option(attrs.exec_dep(), default = None),
"instrumentation_test_listener_class": attrs.option(attrs.string(), default = None),
"is_self_instrumenting": attrs.bool(default = False),
"re_caps": _RE_CAPS,
"re_use_case": _RE_USE_CASE,
"_android_toolchain": toolchains_common.android(),
"_exec_os_type": buck.exec_os_type_arg(),
"_java_test_toolchain": toolchains_common.java_for_host_test(),
"_java_toolchain": toolchains_common.java_for_android(),
},
"android_library": {
"abi_generation_mode": attrs.option(attrs.enum(AbiGenerationMode), default = None),
"javac": attrs.option(attrs.one_of(attrs.exec_dep(), attrs.source()), default = None),
"android_optional_jars": attrs.option(attrs.list(attrs.source()), default = None),
"resources_root": attrs.option(attrs.string(), default = None),
VALIDATION_DEPS_ATTR_NAME: attrs.set(attrs.dep(), sorted = True, default = []),
"_android_toolchain": toolchains_common.android(),
"_build_only_native_code": attrs.default_only(attrs.bool(default = is_build_only_native_code())),
"_compose_stability_config": attrs.option(attrs.source(), default = select({
"DEFAULT": None,
"fbsource//tools/build_defs/android/compose:enable-compose-stability-config": "fbsource//tools/build_defs/android/compose:stability_config",
})),
"_dex_min_sdk_version": attrs.default_only(attrs.option(attrs.int(), default = dex_min_sdk_version())),
"_dex_toolchain": toolchains_common.dex(),
"_exec_os_type": buck.exec_os_type_arg(),
Expand Down Expand Up @@ -198,11 +235,16 @@ extra_attributes = {
"res": attrs.option(attrs.one_of(attrs.source(allow_directory = True), attrs.dict(key = attrs.string(), value = attrs.source(), sorted = True)), default = None),
"_android_toolchain": toolchains_common.android(),
"_build_only_native_code": attrs.default_only(attrs.bool(default = is_build_only_native_code())),
"_java_toolchain": toolchains_common.java_for_android(),
},
"apk_genrule": genrule_attributes() | {
"default_outs": attrs.option(attrs.set(attrs.string(), sorted = False), default = None),
"outs": attrs.option(attrs.dict(key = attrs.string(), value = attrs.set(attrs.string(), sorted = False), sorted = False), default = None),
"type": attrs.string(default = "apk"),
"use_derived_apk": attrs.bool(default = False),
"_android_toolchain": toolchains_common.android(),
"_exec_os_type": buck.exec_os_type_arg(),
"_java_toolchain": toolchains_common.java_for_android(),
},
"gen_aidl": {
"import_paths": attrs.list(attrs.arg(), default = []),
Expand All @@ -215,7 +257,8 @@ extra_attributes = {
},
"robolectric_test": {
"abi_generation_mode": attrs.option(attrs.enum(AbiGenerationMode), default = None),
"javac": attrs.option(attrs.one_of(attrs.exec_dep(), attrs.source()), default = None),
"android_optional_jars": attrs.option(attrs.list(attrs.source()), default = None),
"java_agents": attrs.list(attrs.source(), default = []),
"resources_root": attrs.option(attrs.string(), default = None),
"robolectric_runtime_dependencies": attrs.list(attrs.source(), default = []),
"test_class_names_file": attrs.option(attrs.source(), default = None),
Expand Down
Loading
Loading