read_config and host_info must be invoked through native module in .bzl files.
Created by: ttsugriy
Historically Buck used to not require native functions like read_config
being referenced through any module, but as part of migration to Skylark, we've introduced a native
so that it's clear to users that which functions in .bzl
files are provided by Buck.
ETA for deprecation: next week, since it's an easy fix - you can run the command below to fix add native.
prefix to all read_config
invocations.
grep " read_config(" --include "*.bzl" -rl . | xargs sed -i "s/ read_config(/ native.read_config(/"
Similarly
grep " host_info()" --include "*.bzl" -rl . | xargs sed -i "s/ host_info()/ native.host_info()/"
can fix all unbound host_info
usages.
Affected area: only .bzl
files parsed by Skylark parser are affected, but since it's going to be a default parser, all users are encouraged to update, since this usage is also supported by Python DSL parser.