vdl/compile: Modify CompileExpr to support compilation of package-path
qualified identifiers.

CompileExpr used to use a dummy file that didn't have imports that were
compiled into Env.
This caused compilation of package-path quailified identifiers to fail.
We solved this by introducing ExtractExprPackagePaths that allows users to
retrieve all package paths in expressions. Then CompileExpr will include
all needed expr that are also compiled into Env in the file.
Now CompileExprs will succeed in compiling "a/b/c".Foo if "a/b/c" is
in the Env.

Change-Id: I100bf7378b76bb6a4c5b6518774138b31caf94d0
7 files changed
tree: df858cc14e82a241fc1658c8dae798a1f25401d1
  1. cmd/
  2. examples/
  3. internal/
  4. lib/
  5. runtime/
  6. services/
  7. test/
  8. .gitignore
  9. AUTHORS
  10. CONTRIBUTORS
  11. envvar.go
  12. envvar_test.go
  13. LICENSE
  14. PATENTS
  15. README.md
  16. VERSION
README.md

Vanadium

This repository contains a reference implementation of the Vanadium APIs.

Unlike the APIs in https://github.com/vanadium/go.v23, which promises to provide backward compatibility this repository makes no such promises.