From 32ac7d6c6d06b5191fcc828b762b247b0e27dfda Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 10 Oct 2022 11:43:51 -0700 Subject: refactor(tvix/eval) s/NixPath/NixSearchPath/ Since NixString is the Rust type for nix strings, people might mistake NixPath for the Rust type of nix paths, which it is not. Let's call it NixSearchPath instead. Signed-off-by: Adam Joseph Change-Id: Ib2ea155c4b27cb90d6180a04ea7b951d86607373 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6927 Reviewed-by: kanepyork Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/src/eval.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tvix/eval/src/eval.rs') diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs index 809c8729f711..8973c1a95c19 100644 --- a/tvix/eval/src/eval.rs +++ b/tvix/eval/src/eval.rs @@ -3,7 +3,7 @@ use std::{cell::RefCell, path::PathBuf, rc::Rc}; use crate::{ builtins::global_builtins, errors::{Error, ErrorKind, EvalResult}, - nix_path::NixPath, + nix_search_path::NixSearchPath, observer::{DisassemblingObserver, NoOpObserver, TracingObserver}, value::Value, SourceCode, @@ -27,7 +27,7 @@ pub struct Options { /// A colon-separated list of directories to use to resolve `<...>`-style paths #[cfg_attr(feature = "repl", clap(long, short = 'I', env = "NIX_PATH"))] - nix_path: Option, + nix_search_path: Option, } pub fn interpret(code: &str, location: Option, options: Options) -> EvalResult { @@ -111,13 +111,13 @@ pub fn interpret(code: &str, location: Option, options: Options) -> Eva let result = if options.trace_runtime { crate::vm::run_lambda( - options.nix_path.unwrap_or_default(), + options.nix_search_path.unwrap_or_default(), &mut TracingObserver::new(std::io::stderr()), result.lambda, ) } else { crate::vm::run_lambda( - options.nix_path.unwrap_or_default(), + options.nix_search_path.unwrap_or_default(), &mut NoOpObserver::default(), result.lambda, ) -- cgit 1.4.1