Function starlark::eval::eval_file

source ·
pub fn eval_file<T: FileLoader + 'static>(
    map: &Arc<Mutex<CodeMap>>,
    path: &str,
    build: bool,
    env: &mut Environment,
    file_loader: T
) -> Result<Value, Diagnostic>
Expand description

Evaluate a file, mutate the environment accordingly and return the evaluated value.

Arguments

  • map: the codemap object used for diagnostics
  • path: the file to parse and evaluate
  • build: set to true if you want to evaluate a BUILD file or false to evaluate a .bzl file. More information about the difference can be found in this module’s documentation.
  • env: the environment to mutate during the evaluation
  • file_loader: the FileLoader to react to load() statements.