public abstract class BuckGlobals extends Object
It's recommended to use global frames for all globally accessible variables for improved performance and easier maintenance, since there is only one place to check for variable definitions.
Constructor and Description |
---|
BuckGlobals() |
Modifier and Type | Method and Description |
---|---|
com.google.devtools.build.lib.syntax.ClassObject |
getNativeModule()
Returns a native module with built-in functions and Buck rules.
|
static BuckGlobals |
of(SkylarkFunctionModule skylarkFunctionModule,
com.google.common.collect.ImmutableSet<BaseDescription<?>> descriptions,
UserDefinedRulesState userDefinedRulesState,
ImplicitNativeRulesState implicitNativeRulesState,
RuleFunctionFactory ruleFunctionFactory,
com.google.common.cache.LoadingCache<String,com.google.devtools.build.lib.cmdline.Label> labelCache,
KnownUserDefinedRuleTypes knownUserDefinedRuleTypes,
com.google.common.collect.ImmutableSet<BuiltInProvider<?>> perFeatureProviders)
Create an instance of
BuckGlobals |
@Value.Lazy public com.google.devtools.build.lib.syntax.ClassObject getNativeModule()
It's the module that handles method calls like native.glob
or native.cxx_library
.
public static BuckGlobals of(SkylarkFunctionModule skylarkFunctionModule, com.google.common.collect.ImmutableSet<BaseDescription<?>> descriptions, UserDefinedRulesState userDefinedRulesState, ImplicitNativeRulesState implicitNativeRulesState, RuleFunctionFactory ruleFunctionFactory, com.google.common.cache.LoadingCache<String,com.google.devtools.build.lib.cmdline.Label> labelCache, KnownUserDefinedRuleTypes knownUserDefinedRuleTypes, com.google.common.collect.ImmutableSet<BuiltInProvider<?>> perFeatureProviders)
BuckGlobals