feat(tvix/eval): contextful coercion of files

In the past reference tracking system, `tvix-io` glue was appending
plain paths in the known path state.

Now, we make up for this by just making contextful coercion of file
imports.

Change-Id: Ieb9b04dd83302c77909252d5f7733857ac3cf8fd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10443
Tested-by: BuildkiteCI
Autosubmit: raitobezarius <tvl@lahfa.xyz>
Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
Ryan Lahfa 2023-12-26 04:14:37 +01:00 committed by clbot
parent 951854defc
commit cc098b9aaa

View file

@ -352,6 +352,11 @@ impl Value {
},
) => {
let imported = generators::request_path_import(co, *p).await;
// When we import a path from the evaluator, we must attach
// its original path as its context.
context = context.append(NixContextElement::Plain(
imported.to_string_lossy().to_string(),
));
Ok(imported.to_string_lossy().into_owned())
}
(