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:
parent
951854defc
commit
cc098b9aaa
1 changed files with 5 additions and 0 deletions
|
@ -352,6 +352,11 @@ impl Value {
|
||||||
},
|
},
|
||||||
) => {
|
) => {
|
||||||
let imported = generators::request_path_import(co, *p).await;
|
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())
|
Ok(imported.to_string_lossy().into_owned())
|
||||||
}
|
}
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in a new issue