chore(tvix/eval): add codemap dependency

This will be used to track source spans when emitting bytecode.

The codemap is a data structure which tracks *all* the source files
visited by an evaluation, and makes it possible to represent locations
across all of the files using a simple span (i.e. pair of offsets).

When reporting errors, this even contains enough information to
reconstruct the rnix AST to create fancier reporting in certain cases
if desired.

Change-Id: I4ae98620b9b150fb5a389bd7f1e12670e3192c62
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6374
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-09-01 15:52:48 +03:00 committed by tazjin
parent f8919dbcd6
commit 39e960daa6
2 changed files with 8 additions and 0 deletions

View file

@ -12,6 +12,7 @@ dirs = "4.0.0"
path-clean = "0.1"
tabwriter = { version = "1.2", optional = true }
rowan = "*" # pinned by rnix
codemap = "0.1.3"
# rnix has not been released in a while (as of 2022-08-22), we will
# use it from git.