[Chapel Merge] CLS: display instantiations collected across files

Branch: refs/heads/main
Revision: b62edefeb68028f64e363741ee5783b04b1e90f7
Author: DanilaFe
Link: CLS: display instantiations collected across files by DanilaFe · Pull Request #28558 · chapel-lang/chapel · GitHub
Log Message:
CLS: display instantiations collected across files (#28558)

Depends on CLS: display auto-computed instantiations for procedures that are only generic because of array formals by DanilaFe · Pull Request #28502 · chapel-lang/chapel · GitHub.

This PR makes CLS aggregate function instantiations across several
files. The net result is that with projects where a function is written
in one file, and called from another file, we can now use our
instantiation-showing tooling. This ought to improve the situation for
large projects with multiple generic procedures across several files,
even if CLS: display auto-computed instantiations for procedures that are only generic because of array formals by DanilaFe · Pull Request #28502 · chapel-lang/chapel · GitHub itself (with
its special handling for default-rectangular arrays) does not apply.

Note: at this time, this only works for projects with an explicit
.cls-commands.json file, which tells the editor which files are
related. There might be other ways to do this, but they are not direct
and would take extra work.

Reviewed by @jabraham17 -- thanks!

Testing

  • CLS tests pass, including new test

Compare: Comparing 781b97531badca3482ae105a88aa38e655871b49...1542df6e5446703adea181835d57f54130741b98 · chapel-lang/chapel · GitHub

Diff:
M doc/rst/tools/chpl-language-server/chpl-language-server.rst
M tools/chapel-py/src/core-types-gen.h
M tools/chapel-py/src/method-tables/core-methods.h
M tools/chapel-py/src/python-class.h
M tools/chapel-py/src/resolution.cpp
M tools/chapel-py/src/resolution.h
M tools/chpl-language-server/src/chpl-language-server.py
M tools/chpl-language-server/src/lsp_util.py
M tools/chpl-language-server/test/show_generic.py
https://github.com/chapel-lang/chapel/pull/28558.diff