[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
tree: 98b17b91a7669df08f2e1e81fb635145b3165473
  1. fidl-lsp/
  2. fidldev/
  3. vscode-language-fidl/
  4. .gitignore
  5. .vscodeignore
  6. AUTHORS
  7. CONTRIBUTING.md
  8. LICENSE
  9. PATENTS
  10. README.md
README.md

Fuchsia Open Source Template Repository

This repository is a template that we will use when creating new open source repositories for Fuchsia.