sui icon indicating copy to clipboard operation
sui copied to clipboard

[sui-move-lsp] symbol search breaks on second request

Open SpekalsG3 opened this issue 7 months ago • 4 comments

Steps to Reproduce Issue

  1. Go to a symbol reference that is defined in another module (i.e. sui::object::id(x) or use sui::object::id; id(x))
  2. Try "Go to definition"
  3. Try "Go to definition" again

None of the next attempts will work. Same for "Go to References", hover info, etc.

Also happens to definitions in the same file but not everywhere, not sure why.

If you hover on any symbol, obviously second step will happen in background.

Expected Result

To actually open a file on the line of symbol definition.

Actual Result

Error "No definition found".

System Information

  • OS: macOS M1 Max Sonoma 14.7.1 (23H222)
  • Compiler: rustc 1.87.0 (17067e9ac 2025-05-09)
  • Sui: sui 1.49.1-homebrew
  • Move VSCode extension: 1.0.22, 1.0.21, 1.0.20.
  • sui-move-lsp cargo binary: mainnet-v1.48.2

More info

Things I've tried

  • Tried Move VScode extension with versions 1.0.22, 1.0.21, 1.0.20. Nothing changed.
  • Tried downgrading "Move Trace Debugger" bundled extension from 0.0.8 to 0.0.6 and 0.0.5. Nothing changed.
  • Tried cargo install sui-move-lsp with latest mainnet release mainnet-v1.48.2 and adding "move.server.path": "~/.cargo/bin/move-analyzer" to settings. Nothing changed.
  • Tried using cargo installed move-analyzer with NeoVim. Same behavior. (Actually that's how I found LSP breaks only on second request to find symbol).

VSCode logs

Replaced absolute path to repo with test-repo.

found cached deps for "test-repo"
compiled to parsed AST
compiled to typed AST
compiling to CFGIR
compiled to CFGIR
compilation complete in: 113.681833ms
caching pre-compiled program and pre-computed symbols
analysis complete in 30.71725ms
get_symbols load complete
symbolication finished
code_action_request: Request { id: RequestId(I32(1)), method: "textDocument/codeAction", params: Object {"textDocument": Object {"uri": String("file://test-repo/sources/init.move")}, "range": Object {"start": Object {"line": Number(0), "character": Number(0)}, "end": Object {"line": Number(0), "character": Number(0)}}, "context": Object {"diagnostics": Array [], "triggerKind": Number(2)}} }
on_document_symbol_request: "test-repo/sources/init.move"
inlay_hints_request (types: true, params: true): "test-repo/sources/init.move"
on_document_symbol_request: "test-repo/sources/init.move"
about to send use response (symbols found: false)

Each "Go to Definition" and similar attempts will just spam "about to send use response (symbols found: false)".

Reproduction repo

Just create any 3 files. Naming or logic does not matter.

Move.toml:

[package]
name = "repro"

edition = "2024.beta"

[dependencies]

[addresses]
repro = "0x0"

sources/init.move:

module repro::init;

fun init(ctx: &mut TxContext) {
    repro::foo::foo(ctx);
}

sources/foo.move:

module repro::foo;

public fun foo(_ctx: &mut TxContext) {
}

SpekalsG3 avatar May 29 '25 16:05 SpekalsG3

Thank you for opening this issue, a team member will review it shortly. Until then, please do not interact with any users that claim to be from Sui support and do not click on any links!

github-actions[bot] avatar May 29 '25 16:05 github-actions[bot]

@SpekalsG3 are you using the Mysten Move VS Code extension?

hyd628 avatar May 29 '25 17:05 hyd628

@damirka

hyd628 avatar May 29 '25 17:05 hyd628

@SpekalsG3 are you using the Mysten Move VS Code extension?

@hyd628 Yes, I do. Mentioned in "Things I've tried" section. This one -> Move extension. I've tried versions 1.0.22, 1.0.21, 1.0.20.

Also tried different versions of Move Trace Debugger that comes in the bundle, namely 0.0.8, 0.0.6 and 0.0.5. Tried that because it was mentioned in another issue. No luck

SpekalsG3 avatar May 30 '25 08:05 SpekalsG3

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jul 30 '25 02:07 github-actions[bot]