[fidl][lsp] Use new fidl_project.json format
Changes the Analyzer to use to new fidl_project.json format, which,
instead of being a map of library name --> library info, is a list of
libraries. This supports non-unique FIDL library names.
This essentially involves replacing indexes into Analyzer.libs with
calls to either Analyzer.getLibrary (which just takes a library name,
and uses a "heuristic" to find the library -- assumes library names are
unique) or, better, Analyzer.getLibraryWithFile, which takes a library
name and a file, thereby supporting lookup to libraries with non-unique
names.
This CL also fixes a flaky test, references_test.
Test: go test -p 1 ./...
Change-Id: I66e9e6be010ca7cab02ec751ecc6410ee3df20f8
Reviewed-on: https://fuchsia-review.googlesource.com/c/fidl-misc/+/399954
Reviewed-by: Pascal Perez <pascallouis@google.com>
Reviewed-by: Benjamin Prosnitz <bprosnitz@google.com>
13 files changed