Skip to content

sui_v1.29.0_1720511584_ci

@cgswords cgswords tagged this 09 Jul 05:37
## Description 

This updates the move analyzer to have a notion of a `cursor` and
partially revises autocompletion request handling to use that cursor.
This is just a start, but hopefully paves the way for further and better
autocomplete suggestions in the future.

This PR also makes a few smaller changes:

- `FileByteSize` and `FilePosition` now hold a `FileHash`, not a
`FileId`.
- Added a way to look up a file hash from a file path on `MappedFiles`
- Cleaned up some of the move analyzer's `Symbols` initialization code.
- We now carry `loc` information on `struct` and `enum` definitions
through typing (to determine if the cursor is there).

## Test plan 

- A new test suite for cursors in the analyzer.
- A new test for the autocomplete suggestion of `id: UID` when writing a
struct with `key`, which appeared to be previously untested.

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
Assets 2
Loading