tvl-depot/tvix/eval/src
Aspen Smith 8821746d6c fix(tvix/repl): Share globals and sourcemap across evaluations
Now that we can bind (potentially lazy, potentially lambda-containing)
values in the REPL and then reference them in subsequent evaluations,
it's important that the values to which we construct shared references
are shared across those subsequent evaluations - otherwise, we get
panics due to unknown source map locations, or dropped weak references
to globals.

This change assigns both the globals and the source map as fields on the
Repl after the first evaluation, and then passes those in (to the
EvaluationBuilder) on subsequent evaluations.

On the EvaluationBuilder side, there's some panicking introduced - this
is intentional, as my intent is for the builder to be configured
statically enough that panicking is the best way to report errors
here (it's always a bug to misconfigure an Evaluation, and we'd never
want to handle it dynamically).

Change-Id: I37225697235c22b683ca48a17d30fa8fedd12d1b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11960
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: aspen <root@gws.fyi>
Tested-by: BuildkiteCI
2024-07-07 15:04:26 +00:00
..
builtins refactor(tvix/eval): Drop LightSpan entirely 2024-07-05 03:53:44 +00:00
compiler fix(tvix/repl): Share globals and sourcemap across evaluations 2024-07-07 15:04:26 +00:00
tests refactor(tvix/eval): Builderize Evaluation 2024-07-06 15:03:46 +00:00
value refactor(tvix/eval): Drop LightSpan entirely 2024-07-05 03:53:44 +00:00
vm refactor(tvix/eval): Drop LightSpan entirely 2024-07-05 03:53:44 +00:00
chunk.rs feat(tvix/eval): Don't emit OpForce for non-thunk constants 2024-02-01 21:08:35 +00:00
errors.rs feat(tvix/eval): Allow passing in an env to evaluation 2024-07-05 16:39:34 +00:00
io.rs feat(tvix/eval): add file_type method 2024-06-26 04:51:31 +00:00
lib.rs fix(tvix/repl): Share globals and sourcemap across evaluations 2024-07-07 15:04:26 +00:00
nix_search_path.rs fix(tvix/eval/nix_search_path): gate tests on impure feature 2024-05-26 19:53:51 +00:00
observer.rs feat(tvix/eval/observer): Allow capturing timing of events 2024-01-31 04:41:37 +00:00
opcode.rs refactor(tvix/eval): let OpCoerceToString select the CoercionKind 2023-12-29 21:34:45 +00:00
pretty_ast.rs fix(tvix/eval): fix current clippy warnings 2022-12-25 18:25:06 +00:00
properties.rs refactor(tvix/eval): Don't (ab)use PartialEq for Nix equality 2022-09-18 22:03:41 +00:00
source.rs refactor(tvix/eval): impl Default for SourceCode 2023-08-20 21:52:21 +00:00
spans.rs feat(tvix/eval): Allow passing in an env to evaluation 2024-07-05 16:39:34 +00:00
systems.rs fix(tvix/eval): fix current clippy warnings 2022-12-25 18:25:06 +00:00
test_utils.rs test(tvix/eval): Add proof-of-concept test for Chunk 2022-09-18 17:55:06 +00:00
upvalues.rs fix(tvix/eval): remove impl PartialEq for Value 2022-11-04 00:30:13 +00:00
warnings.rs feat(tvix/glue): emit a warning in case of bad SRI hashes 2024-01-03 13:01:02 +00:00