Skip to content

Commit

Permalink
use load_symbols to override read_config and read_root_config into st…
Browse files Browse the repository at this point in the history
…arlark defined one

Summary: We have starlark wrappers around read_config and read_root_config that basically add logging and easy to tweak.

Reviewed By: scottcao

Differential Revision: D67046846

fbshipit-source-id: 703cda6e6bd6eaacf0f35f9286d2f8036a19807c
  • Loading branch information
perehonchuk authored and facebook-github-bot committed Jan 24, 2025
1 parent 56b782f commit bd62779
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions prelude/prelude.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
# of this source tree.

load("@prelude//:native.bzl", _native = "native")
load("@prelude//utils:buckconfig.bzl", _read_config = "read_config_with_logging", _read_root_config = "read_root_config_with_logging", log_buckconfigs = "LOG_BUCKCONFIGS")

__overridden_builtins__ = {
"read_config": _read_config,
"read_root_config": _read_root_config,
} if log_buckconfigs else {}

load_symbols(__overridden_builtins__)

# Public symbols in this file become globals everywhere except `bzl` files in prelude.
# Additionally, members of `native` struct also become globals in `BUCK` files.
Expand Down

0 comments on commit bd62779

Please sign in to comment.