Giter Club home page Giter Club logo

Comments (3)

F01ivor4 avatar F01ivor4 commented on June 2, 2024

Same issue maybe: #437

from vscode-solidity.

juanfranblanco avatar juanfranblanco commented on June 2, 2024

@ClaudeZsb check the latest and see if it fixes it

from vscode-solidity.

fluffywaffles avatar fluffywaffles commented on June 2, 2024

On latest ([email protected]), and curiously, the server seems to be trying to use multiple versions at once--and it insists on installing soljson-latest.js, which I am assuming is where 0.8.19 is coming from... LSP log output attached. I have scrubbed from the log output some details about the code in question, but it is still largely complete.

LSP Log output, verbosity=debug
[START][2024-02-21 23:39:24] LSP logging initiated
[INFO][2024-02-21 23:39:24] .../vim/lsp/rpc.lua:662	"Starting RPC client"	{  args = { "--stdio" },  cmd = "/home/fluffywaffles/.npm/bin/vscode-solidity-server",  extra = {}}
[DEBUG][2024-02-21 23:39:24] .../vim/lsp/rpc.lua:284	"rpc.send"	{  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      textDocument = {        callHierarchy = {          dynamicRegistration = false        },        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" }            }          },          dataSupport = true,          dynamicRegistration = false,          isPreferredSupport = true,          resolveSupport = {            properties = { "edit" }          }        },        completion = {          completionItem = {            commitCharactersSupport = false,            deprecatedSupport = true,            documentationFormat = { "markdown", "plaintext" },            insertReplaceSupport = true,            insertTextModeSupport = {              valueSet = { 1, 2 }            },            labelDetailsSupport = true,            preselectSupport = true,            resolveSupport = {              properties = {}            },            snippetSupport = true,            tagSupport = {              valueSet = { 1 }            }          },          completionItemKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }          },          contextSupport = false,          dynamicRegistration = false        },        declaration = {          linkSupport = true        },        definition = {          linkSupport = true        },        documentHighlight = {          dynamicRegistration = false        },        documentSymbol = {          dynamicRegistration = false,          hierarchicalDocumentSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = false        },        implementation = {          linkSupport = true        },        publishDiagnostics = {          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 }          }        },        references = {          dynamicRegistration = false        },        rename = {          dynamicRegistration = false,          prepareSupport = true        },        semanticTokens = {          augmentsSyntaxTokens = true,          dynamicRegistration = false,          formats = { "relative" },          multilineTokenSupport = false,          overlappingTokenSupport = true,          requests = {            full = {              delta = true            },            range = false          },          serverCancelSupport = false,          tokenModifiers = { "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" },          tokenTypes = { "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator", "decorator" }        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            activeParameterSupport = true,            documentationFormat = { "markdown", "plaintext" },            parameterInformation = {              labelOffsetSupport = true            }          }        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = true,          willSaveWaitUntil = true        },        typeDefinition = {          linkSupport = true        }      },      window = {        showDocument = {          support = true        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false          }        },        workDoneProgress = true      },      workspace = {        applyEdit = true,        configuration = true,        didChangeWatchedFiles = {          dynamicRegistration = false,          relativePatternSupport = true        },        semanticTokens = {          refreshSupport = true        },        symbol = {          dynamicRegistration = false,          hierarchicalWorkspaceSymbolSupport = true,          symbolKind = {            valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 }          }        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" }        },        workspaceFolders = true      }    },    clientInfo = {      name = "Neovim",      version = "0.9.5"    },    initializationOptions = "/home/fluffywaffles/.cache/nvim/vscode-solidity-server",    processId = 1410116,   ...}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "1",    type = 3  }}
[INFO][2024-02-21 23:39:25] ...lsp/handlers.lua:539	"1"
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "initVersion",    type = 4  }}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "latest",    type = 4  }}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  id = 1,  jsonrpc = "2.0",  result = {    capabilities = {      completionProvider = {        resolveProvider = false,        triggerCharacters = { "." }      },      definitionProvider = true,      hoverProvider = true,      referencesProvider = true,      textDocumentSync = 1,      workspace = {        workspaceFolders = {          supported = true        }      }    }  }}
[INFO][2024-02-21 23:39:25] ...lsp/handlers.lua:539	"initVersion"
[INFO][2024-02-21 23:39:25] ...lsp/handlers.lua:539	"latest"
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "initialized",  params = vim.empty_dict()}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "workspace/didChangeConfiguration",  params = {    settings = {      solidity = {        compileUsingRemoteVersion = "v0.8.23+commit.f704f362",        formatter = "forge"      }    }  }}
[INFO][2024-02-21 23:39:25] .../lua/vim/lsp.lua:1344	"LSP[vscode-solidity-server]"	"server_capabilities"	{  server_capabilities = {    completionProvider = {      resolveProvider = false,      triggerCharacters = { "." }    },    definitionProvider = true,    hoverProvider = true,    referencesProvider = true,    textDocumentSync = {      change = 1,      openClose = true,      save = {        includeText = false      },      willSave = false,      willSaveWaitUntil = false    },    workspace = {      workspaceFolders = {        supported = true      }    }  }}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:284	"rpc.send"	{  jsonrpc = "2.0",  method = "textDocument/didOpen",  params = {    textDocument = {      languageId = "solidity",      text = "...",      uri = "file:///home/fluffywaffles/dev/work/compound/quark/test/quark-core/EIP712.t.sol",      version = 0    }  }}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  id = 0,  jsonrpc = "2.0",  method = "client/registerCapability",  params = {    registrations = { {        id = "5f1a2e47-6ae6-4663-bb1e-904b9d47b6c4",        method = "workspace/didChangeWorkspaceFolders",        registerOptions = vim.empty_dict()      } }  }}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "1",    type = 3  }}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "initVersion",    type = 4  }}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "v0.8.23+commit.f704f362",    type = 4  }}
[WARN][2024-02-21 23:39:25] ...lsp/handlers.lua:137	"The language server vscode-solidity-server triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:403	"server_request: callback result"	{  result = vim.NIL,  status = true}
[DEBUG][2024-02-21 23:39:25] .../vim/lsp/rpc.lua:284	"rpc.send"	{  id = 0,  jsonrpc = "2.0",  result = vim.NIL}
[INFO][2024-02-21 23:39:25] ...lsp/handlers.lua:539	"1"
[INFO][2024-02-21 23:39:25] ...lsp/handlers.lua:539	"initVersion"
[INFO][2024-02-21 23:39:25] ...lsp/handlers.lua:539	"v0.8.23+commit.f704f362"
[DEBUG][2024-02-21 23:39:27] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Validating using the compiler selected: remote",    type = 3  }}
[INFO][2024-02-21 23:39:27] ...lsp/handlers.lua:539	"Validating using the compiler selected: remote"
[DEBUG][2024-02-21 23:39:27] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Validating using compiler version: 0.8.19+commit.7dd6d404.Emscripten.clang",    type = 3  }}
[DEBUG][2024-02-21 23:39:27] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Validating using the compiler selected: remote",    type = 3  }}
[DEBUG][2024-02-21 23:39:27] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Validating using compiler version: 0.8.19+commit.7dd6d404.Emscripten.clang",    type = 3  }}
[DEBUG][2024-02-21 23:39:27] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Validating using compiler selected version: v0.8.23+commit.f704f362",    type = 3  }}
[DEBUG][2024-02-21 23:39:27] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        code = "5333",        message = "Source file requires different compiler version (current compiler is 0.8.19+commit.7dd6d404.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version",        range = {          ["end"] = {            character = 23,            line = 1          },          start = {            character = 0,            line = 1          }        },        severity = 1      } },    uri = "file:///home/fluffywaffles/dev/work/compound/quark/test/quark-core/EIP712.t.sol"  }}
[INFO][2024-02-21 23:39:27] ...lsp/handlers.lua:539	"Validating using compiler version: 0.8.19+commit.7dd6d404.Emscripten.clang"
[INFO][2024-02-21 23:39:27] ...lsp/handlers.lua:539	"Validating using the compiler selected: remote"
[INFO][2024-02-21 23:39:27] ...lsp/handlers.lua:539	"Validating using compiler version: 0.8.19+commit.7dd6d404.Emscripten.clang"
[INFO][2024-02-21 23:39:27] ...lsp/handlers.lua:539	"Validating using compiler selected version: v0.8.23+commit.f704f362"
[DEBUG][2024-02-21 23:39:29] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Validating using the compiler selected: remote",    type = 3  }}
[INFO][2024-02-21 23:39:29] ...lsp/handlers.lua:539	"Validating using the compiler selected: remote"
[DEBUG][2024-02-21 23:39:29] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Validating using compiler version: 0.8.23+commit.f704f362.Emscripten.clang",    type = 3  }}
[DEBUG][2024-02-21 23:39:29] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "window/logMessage",  params = {    message = "Validating using compiler selected version: v0.8.23+commit.f704f362",    type = 3  }}
[DEBUG][2024-02-21 23:39:29] .../vim/lsp/rpc.lua:387	"rpc.receive"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        code = "9755",        message = "Wrong argument count for struct constructor: 0 arguments given but expected 5.",        range = {          ["end"] = {            character = 77,            line = 107          },          start = {            character = 47,            line = 107          }        },        severity = 1      } },    uri = "file:///home/fluffywaffles/dev/work/compound/quark/test/quark-core/EIP712.t.sol"  }}
[INFO][2024-02-21 23:39:29] ...lsp/handlers.lua:539	"Validating using compiler version: 0.8.23+commit.f704f362.Emscripten.clang"
[INFO][2024-02-21 23:39:29] ...lsp/handlers.lua:539	"Validating using compiler selected version: v0.8.23+commit.f704f362"

What's interesting to me is the Validating using compiler version lines, which sometimes say 0.8.23 (yay!) but then it switches to 0.8.19... It almost seems like a race condition, and 0.8.19 always eventually wins, even if for a short time I get proper diagnostics from 0.8.23.

from vscode-solidity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.