tvl-depot/corp/tvixbolt
Vincent Ambo 4b9178fa2a feat(tvix/eval): insert import into the builtins itself
Adding `import` to builtins causes causes a bootstrap cycle because
the `import` builtin needs to be initialised with the set of globals
before being inserted into the globals, which also must contain
itself.

To break out of the cycle this hack wraps the builtins passed to the
compiler in an `Rc` (probably sensible anyways, as they will end up
getting cloned a bunch), containing a RefCell which gives us mutable
access to the builtins.

This opens up a potentially dangerous footgun in which we could mutate
the builtins at runtime leading to different compiler invocations
seeing different builtins, so it'd be nice to have some kind of
"finalised" status for them or some such, but I'm not sure how to
represent that atm.

Change-Id: I25f8d4d2a7e8472d401c8ba2f4bbf9d86ab2abcb
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6867
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
2022-10-07 14:24:36 +00:00
..
src feat(tvix/eval): insert import into the builtins itself 2022-10-07 14:24:36 +00:00
.gitignore chore(corp/tvixbolt): gitignore trunk's dist folder 2022-09-20 10:59:32 +00:00
Cargo.lock chore(3p/sources): Bump channels & overlays 2022-10-06 23:23:42 +00:00
Cargo.toml chore(3p/sources): Bump channels & overlays 2022-10-06 23:23:42 +00:00
default.nix fix(tvix/eval): support string identifiers in inherits 2022-09-22 23:07:14 +00:00
index.css feat(corp/tvixbolt): add some additional information on the page 2022-09-04 18:50:06 +00:00
index.html feat(corp/tvixbolt): add an ad in the footer 2022-09-13 12:47:18 +00:00