Skip to content

sui_v1.16.0_1704244054_ci

@awelc awelc tagged this 02 Jan 23:51
## Description 

This PR extends on-hover support to include module accesses. When
hovering over a module name, we now see a description of the module and
can jump into its definition:


![image](https://github.com/MystenLabs/sui/assets/1724397/2a046712-0650-447b-90e0-e511dca113e0)

This also works for aliases:


![image](https://github.com/MystenLabs/sui/assets/1724397/231955dc-5c29-4fa0-be37-07b0d2f287ab)

This PR also includes a refactoring to reduce the number of parameters
that were being threaded thorough all calls of both symbolicators.

At a high level, the implementation of this new feature is quite simple
- a module access that needs to be connected with module definition can
only happen when accessing a struct or a const, or when calling a
function, and we need to add an additional `UseDef` in these places.
What complicates things is aliasing - at the level of typed AST we no
longer have access to alias names in module accesses (see explanation
around this
[comment](https://github.com/MystenLabs/sui/pull/15503/files#r1438361789)
in the code itself). A large portion of this PR is then an extension to
`ParsingSymbolicator` to record the correct lengths of aliases so that
they can be used when `TypingSymbolicator` needs them.

## Test Plan 

New tests have been added.
Assets 2
Loading