Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] GHDL-LS crashes with some projects on Windows #79

Open
pidgeon777 opened this issue Jun 22, 2021 · 24 comments
Open

[Bug] GHDL-LS crashes with some projects on Windows #79

pidgeon777 opened this issue Jun 22, 2021 · 24 comments

Comments

@pidgeon777
Copy link

When I use GHDL-LS with Neovim, if I open a source file not defined in the list of project files, GHDL-LS keep running, but as soon as I open a source file belonging to the list specified in the hdl-prj.json file, it crashes.

OS: Windows 10 x64 Pro
ghdl-ls: ghdl-ls 2.0.0-dev

hdl-prj.json:

{
    "options": {
        "ghdl_analysis": [
            "--workdir=work",
            "--ieee=synopsys",
            "-fexplicit",
            "--warn-library",
            "--warn-default-binding",
            "--warn-binding",
            "--warn-reserved",
            "--warn-nested-comment",
            "--warn-parenthesis",
            "--warn-vital-generic",
            "--warn-delayed-checks",
            "--warn-body",
            "--warn-specs",
            "--warn-runtime-error",
            "--warn-shared",
            "--warn-hide",
            "--warn-unused",
            "--warn-others",
            "--warn-pure",
            "--warn-static"
        ]
    },
    "files": [
        { "file": "ENTITY_TOP.vhd", "language": "vhdl" }
    ] 
}

ENTITY_TOP.vhd:

library ieee;
use ieee.std_logic_1164.all;

entity ENTITY_TOP is
  generic (
    GEN : integer := 0
  );
  port (
    INP : in std_logic
  );
end entity;

architecture arch of ENTITY_TOP is
  signal sig : std_logic := '0';
  
  component ENTITY_1
    generic (
      GEN : integer := 0
    );
    port (
      INP : in std_logic
    );
  end component;
  
  component ENTITY_2
    generic (
      GEN : integer := 0
    );
    port (
      INP : in std_logic
    );
  end component;
  
begin

  ENTITY_1_1 : entity work.ENTITY_1(arch1)
  generic map(
    GEN => GEN
  )
  port map(
    INP => INP
  );
  
  ENTITY_1_2 : entity work.ENTITY_1(arch2)
  generic map(
    GEN => GEN
  )
  port map(
    INP => INP
  );
  
  ENTITY_2_1 : entity work.ENTITY_2(arch1)
  generic map(
    GEN => GEN
  )
  port map(
    INP => INP
  );
  
  ENTITY_2_2 : entity work.ENTITY_2(arch2)
  generic map(
    GEN => GEN
  )
  port map(
    INP => INP
  );
  
  PROC_p: process(INP)
  -----------------------------
  variable var_v : integer := 0;
  -----------------------------
  begin
      -----------------------------
      var_v := 0;
      -----------------------------
      if (INP = '1') then
        sig <= '1';
      else
        sig <= '0';
      end if;
      -----------------------------
  end process;
  -----------------------------
  
  process
  -----------------------------
  variable var_v : integer := 0;
  -----------------------------
  begin
      -----------------------------
      var_v := 0;
      -----------------------------
      if (INP = '1') then
        sig <= '1';
      else
        sig <= '0';
      end if;
      -----------------------------
  end process;
  -----------------------------
end architecture;

vhdl-ls.log

2021-06-22 12:14:27,874 [INFO] Args: ['C:\\msys64\\mingw64\\bin\\ghdl-ls', '--verbose', '--log-file', 'vhdl-ls.log', '--trace-file', 'vhdl-ls.trace']
2021-06-22 12:14:27,874 [INFO] Current directory is C:\Work\MEGA\Portable
2021-06-22 12:14:27,878 [INFO] reading project file C:\Work\MEGA\Portable\GHDL\bin\src_test\hdl-prj.json
2021-06-22 12:14:27,878 [INFO] Using options: ['--workdir=work', '--ieee=synopsys', '-fexplicit', '--warn-library', '--warn-default-binding', '--warn-binding', '--warn-reserved', '--warn-nested-comment', '--warn-parenthesis', '--warn-vital-generic', '--warn-delayed-checks', '--warn-body', '--warn-specs', '--warn-runtime-error', '--warn-shared', '--warn-hide', '--warn-unused', '--warn-others', '--warn-pure', '--warn-static']
2021-06-22 12:14:27,881 [INFO] loading ENTITY_TOP.vhd

vhdl-ls.trace.in

Content-Length: 2742



{"id": 1, "jsonrpc": "2.0", "method": "initialize", "params": {"rootUri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test", "initializationOptions": {}, "capabilities": {"workspace": {"workspaceFolders": true, "workspaceEdit": {"resourceOperations": ["rename", "create", "delete"]}, "applyEdit": true, "symbol": {"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]}, "dynamicRegistration": false, "hierarchicalWorkspaceSymbolSupport": true}, "configuration": true}, "window": {"showDocument": {"support": false}, "showMessage": {"messageActionItem": {"additionalPropertiesSupport": false}}, "workDoneProgress": true}, "callHierarchy": {"dynamicRegistration": false}, "textDocument": {"documentSymbol": {"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]}, "dynamicRegistration": false, "hierarchicalDocumentSymbolSupport": true}, "references": {"dynamicRegistration": false}, "publishDiagnostics": {"relatedInformation": true, "tagSupport": {"valueSet": [1, 2]}}, "rename": {"prepareSupport": true, "dynamicRegistration": false}, "synchronization": {"didSave": true, "willSaveWaitUntil": false, "willSave": false, "dynamicRegistration": false}, "completion": {"completionItem": {"snippetSupport": false, "commitCharactersSupport": false, "preselectSupport": false, "deprecatedSupport": false, "documentationFormat": ["markdown", "plaintext"]}, "contextSupport": false, "dynamicRegistration": false, "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]}}, "definition": {"linkSupport": true}, "codeAction": {"codeActionLiteralSupport": {"codeActionKind": {"valueSet": ["", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration": false}, "documentHighlight": {"dynamicRegistration": false}, "signatureHelp": {"signatureInformation": {"documentationFormat": ["markdown", "plaintext"]}, "dynamicRegistration": false}, "declaration": {"linkSupport": true}, "hover": {"dynamicRegistration": false, "contentFormat": ["markdown", "plaintext"]}, "implementation": {"linkSupport": true}, "typeDefinition": {"linkSupport": true}}}, "rootPath": "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test", "clientInfo": {"version": "0.5.0", "name": "Neovim"}, "processId": 14920, "trace": "off", "workspaceFolders": [{"uri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test", "name": "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test"}]}}Content-Length: 57



{"method": "initialized", "jsonrpc": "2.0", "params": {}}Content-Length: 2037



{"method": "textDocument/didOpen", "jsonrpc": "2.0", "params": {"textDocument": {"uri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd", "version": 0, "languageId": "vhdl", "text": "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n"}}}

vhdl-ls.trace.out

Content-Length: 392



{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{"includeText":true}},"hoverProvider":false,"definitionProvider":true,"referencesProvider":false,"documentHighlightProvider":false,"documentSymbolProvider":true,"codeActionProvider":false,"documentFormattingProvider":false,"documentRangeFormattingProvider":true,"renameProvider":false}}}

Neovim LSP log:

[ START ] 2021-06-22T12:20:03+0200 ] LSP logging initiated
[ INFO ] 2021-06-22T12:20:14+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:311 ]	"Starting RPC client"	{  args = { "--verbose", "--log-file", "vhdl-ls.log", "--trace-file", "vhdl-ls.trace" },  cmd = "ghdl-ls",  extra = {}}
[ DEBUG ] 2021-06-22T12:20:14+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:826 ]	"LSP[ghdl_ls]"	"initialize_params"	{  capabilities = {    callHierarchy = {      dynamicRegistration = false,      <metatable> = <1>{        __tostring = <function 1>      }    },    textDocument = {      codeAction = {        codeActionLiteralSupport = {          codeActionKind = {            valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        dynamicRegistration = false,        <metatable> = <table 1>      },      completion = {        completionItem = {          commitCharactersSupport = false,          deprecatedSupport = false,          documentationFormat = { "markdown", "plaintext" },          preselectSupport = false,          snippetSupport = false,          <metatable> = <table 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 },          <metatable> = <table 1>        },        contextSupport = false,        dynamicRegistration = false,        <metatable> = <table 1>      },      declaration = {        linkSupport = true,        <metatable> = <table 1>      },      definition = {        linkSupport = true,        <metatable> = <table 1>      },      documentHighlight = {        dynamicRegistration = false,        <metatable> = <table 1>      },      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 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      hover = {        contentFormat = { "markdown", "plaintext" },        dynamicRegistration = false,        <metatable> = <table 1>      },      implementation = {        linkSupport = true,        <metatable> = <table 1>      },      publishDiagnostics = {        relatedInformation = true,        tagSupport = {          valueSet = { 1, 2 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      references = {        dynamicRegistration = false,        <metatable> = <table 1>      },      rename = {        dynamicRegistration = false,        prepareSupport = true,        <metatable> = <table 1>      },      signatureHelp = {        dynamicRegistration = false,        signatureInformation = {          documentationFormat = { "markdown", "plaintext" },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      synchronization = {        didSave = true,        dynamicRegistration = false,        willSave = false,        willSaveWaitUntil = false,        <metatable> = <table 1>      },      typeDefinition = {        linkSupport = true,        <metatable> = <table 1>      },      <metatable> = <table 1>    },    window = {      showDocument = {        support = false,        <metatable> = <table 1>      },      showMessage = {        messageActionItem = {          additionalPropertiesSupport = false,          <metatable> = <table 1>        },        <metatable> = <table 1>      },      workDoneProgress = true,      <metatable> = <table 1>    },    workspace = {      applyEdit = true,      configuration = 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 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      workspaceEdit = {        resourceOperations = { "rename", "create", "delete" },        <metatable> = <table 1>      },      workspaceFolders = true,      <metatable> = <table 1>    }  },  clientInfo = {    name = "Neovim",    version = "0.5.0"  },  initializationOptions = vim.empty_dict(),  processId = 32368,  rootPath = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",  rootUri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test",  trace = "off",  workspaceFolders = { {      name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",      uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"    } }}
[ DEBUG ] 2021-06-22T12:20:14+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      callHierarchy = {        dynamicRegistration = false,        <metatable> = <1>{          __tostring = <function 1>        }      },      textDocument = {        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },              <metatable> = <table 1>            },            <metatable> = <table 1>          },          dynamicRegistration = false,          <metatable> = <table 1>        },        completion = {          completionItem = {            commitCharactersSupport = false,            deprecatedSupport = false,            documentationFormat = { "markdown", "plaintext" },            preselectSupport = false,            snippetSupport = false,            <metatable> = <table 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 },            <metatable> = <table 1>          },          contextSupport = false,          dynamicRegistration = false,          <metatable> = <table 1>        },        declaration = {          linkSupport = true,          <metatable> = <table 1>        },        definition = {          linkSupport = true,          <metatable> = <table 1>        },        documentHighlight = {          dynamicRegistration = false,          <metatable> = <table 1>        },        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 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = false,          <metatable> = <table 1>        },        implementation = {          linkSupport = true,          <metatable> = <table 1>        },        publishDiagnostics = {          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        references = {          dynamicRegistration = false,          <metatable> = <table 1>        },        rename = {          dynamicRegistration = false,          prepareSupport = true,          <metatable> = <table 1>        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            documentationFormat = { "markdown", "plaintext" },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = false,          willSaveWaitUntil = false,          <metatable> = <table 1>        },        typeDefinition = {          linkSupport = true,          <metatable> = <table 1>        },        <metatable> = <table 1>      },      window = {        showDocument = {          support = false,          <metatable> = <table 1>        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false,            <metatable> = <table 1>          },          <metatable> = <table 1>        },        workDoneProgress = true,        <metatable> = <table 1>      },      workspace = {        applyEdit = true,        configuration = 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 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" },          <metatable> = <table 1>        },        workspaceFolders = true,        <metatable> = <table 1>      }    },    clientInfo = {      name = "Neovim",      version = "0.5.0"    },    initializationOptions = vim.empty_dict(),    processId = 32368,    rootPath = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",    rootUri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test",    trace = "off",    workspaceFolders = { {        name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",        uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"      } }  }}
[ DEBUG ] 2021-06-22T12:20:14+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:491 ]	"decoded"	{  id = 1,  jsonrpc = "2.0",  result = {    capabilities = {      codeActionProvider = false,      definitionProvider = true,      documentFormattingProvider = false,      documentHighlightProvider = false,      documentRangeFormattingProvider = true,      documentSymbolProvider = true,      hoverProvider = false,      referencesProvider = false,      renameProvider = false,      textDocumentSync = {        change = 2,        openClose = true,        save = {          includeText = true        }      }    }  }}
[ DEBUG ] 2021-06-22T12:20:14+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  jsonrpc = "2.0",  method = "initialized",  params = {    [true] = 6  }}
[ DEBUG ] 2021-06-22T12:20:14+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:853 ]	"LSP[ghdl_ls]"	"server_capabilities"	{  codeActionProvider = false,  definitionProvider = true,  documentFormattingProvider = false,  documentHighlightProvider = false,  documentRangeFormattingProvider = true,  documentSymbolProvider = true,  hoverProvider = false,  referencesProvider = false,  renameProvider = false,  textDocumentSync = {    change = 2,    openClose = true,    save = {      includeText = true    }  }}
[ INFO ] 2021-06-22T12:20:14+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:854 ]	"LSP[ghdl_ls]"	"initialized"	{  resolved_capabilities = {    call_hierarchy = false,    code_action = false,    code_lens = false,    code_lens_resolve = false,    completion = false,    declaration = false,    document_formatting = false,    document_highlight = false,    document_range_formatting = true,    document_symbol = true,    execute_command = false,    find_references = false,    goto_definition = true,    hover = false,    implementation = false,    rename = false,    signature_help = false,    signature_help_trigger_characters = {},    text_document_did_change = 2,    text_document_open_close = true,    text_document_save = {      includeText = true    },    text_document_save_include_text = true,    text_document_will_save = false,    text_document_will_save_wait_until = false,    type_definition = false,    workspace_folder_properties = {      changeNotifications = false,      supported = false    },    workspace_symbol = false  }}
[ DEBUG ] 2021-06-22T12:20:14+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  jsonrpc = "2.0",  method = "textDocument/didOpen",  params = {    textDocument = {      languageId = "vhdl",      text = "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n",      uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd",      version = 0    }  }}
[ ERROR ] 2021-06-22T12:20:14+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:457 ]	"rpc"	"ghdl-ls"	"stderr"	"\nraised SYSTEM.ASSERTIONS.ASSERT_FAILURE : files_map.adb:608\n"
[ INFO ] 2021-06-22T12:20:21+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:1213 ]	"exit_handler"	{}

particularly:

[ ERROR ] 2021-06-22T12:20:14+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:457 ]	"rpc"	"ghdl-ls"	"stderr"	"\nraised SYSTEM.ASSERTIONS.ASSERT_FAILURE : files_map.adb:608\n"

Something seems to have caused an exception related to the files_map.adb GHDL-LS file, line 608.

@pidgeon777
Copy link
Author

An update: when specifying the full source file path in the hdl-prj.json file, going from this:

....
    "files": [
        { "file": "ENTITY_TOP.vhd", "language": "vhdl" }
    ] 
....

to this:

....
    "files": [
        { "file": "C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd", "language": "vhdl" }
    ] 
....

then GHDL-LS doesn't crash anymore when opening that file, but it reports as warning:

entity "entity_top" was also defined in file "C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd"

In conclusion, in my opinion, there are some serious bugs in the way file paths are managed by GHDL-LS on Windows.

For example, when opening the source file with the entity definition of ENTITY_TOP, even if this file is also added to hdl-prj.json, it gets analysed but it is reported as if that very same file is not considered as belonging to the project.

So, we have to investigate the way file paths are handled by GHDL-LS on Windows, and this should be a good start to fix the issue.

@pidgeon777 pidgeon777 changed the title [Bug] GHDL-LS crashes with some projects [Bug] Incorrect management of GHDL-LS crashes with some projects on Windows Jun 22, 2021
@pidgeon777 pidgeon777 changed the title [Bug] Incorrect management of GHDL-LS crashes with some projects on Windows [Bug] GHDL-LS crashes with some projects on Windows Jun 22, 2021
@eine
Copy link
Contributor

eine commented Jun 22, 2021

@pidgeon777, how are you installing GHDL, ghdl-ls and the Neovim client on WIndows?

@pidgeon777
Copy link
Author

For installing ghdl-ls, I followed those advices:

#73 (comment)

Neovim (nightly win64) was downloaded from here:

https://github.com/neovim/neovim/releases

Neovim version:

NVIM v0.5.0-dev+1384-gf2906a466
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe /DWIN32 /D_WINDOWS /W3 /MD /Zi /O2 /Ob1 /DNDEBUG /W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -D_WIN32_WINNT=0x0600 -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -ID:/a/neovim/neovim/build/config -ID:/a/neovim/neovim/src -ID:/a/neovim/neovim/nvim-deps/usr/include -ID:/a/neovim/neovim/build/src/nvim/auto -ID:/a/neovim/neovim/build/include
Compilato da runneradmin@fv-az152-886

Features: -acl +iconv +tui
See ":help feature-compile"

   file vimrc di sistema: "$VIM\sysinit.vim"
         $VIM di riserva: "C:/Program Files/nvim/share/nvim"

Run :checkhealth for more info

ghdl-ls --disp-config run in Neovim:

command line prefix (--PREFIX): (not set)
environment prefix (GHDL_PREFIX): (not set)
exec prefix (from program name): C:\msys64\mingw64

library prefix: C:\msys64\mingw64\lib/ghdl
library directory: C:\msys64\mingw64\lib/ghdl

ghdl-ls.exe location : C:\msys64\mingw64\bin\ghdl-ls.exe

@tgingold
Copy link
Member

tgingold commented Jun 23, 2021 via email

@pidgeon777
Copy link
Author

I'm willing to help with the testing.

@tgingold
Copy link
Member

tgingold commented Jun 23, 2021 via email

@pidgeon777
Copy link
Author

pidgeon777 commented Jun 28, 2021

vhdl-ls.log:

2021-06-28 12:25:39,724 [INFO] Args: ['C:\\msys64\\mingw64\\bin\\ghdl-ls', '--verbose', '--verbose', '--log-file', 'vhdl-ls.log', '--trace-file', 'vhdl-ls.trace']
2021-06-28 12:25:39,724 [INFO] Current directory is C:\Work\MEGA\Portable
2021-06-28 12:25:39,765 [DEBUG] Headers: {'Content-Length': '2742'}
2021-06-28 12:25:39,766 [DEBUG] Read msg: {'method': 'initialize', 'jsonrpc': '2.0', 'id': 1, 'params': {'initializationOptions': {}, 'rootUri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test', 'workspaceFolders': [{'uri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test', 'name': 'C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test'}], 'rootPath': 'C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test', 'clientInfo': {'version': '0.5.0', 'name': 'Neovim'}, 'processId': 19368, 'trace': 'off', 'capabilities': {'workspace': {'workspaceFolders': True, 'configuration': True, 'workspaceEdit': {'resourceOperations': ['rename', 'create', 'delete']}, 'symbol': {'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]}, 'dynamicRegistration': False, 'hierarchicalWorkspaceSymbolSupport': True}, 'applyEdit': True}, 'window': {'showDocument': {'support': False}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': False}}, 'workDoneProgress': True}, 'callHierarchy': {'dynamicRegistration': False}, 'textDocument': {'declaration': {'linkSupport': True}, 'documentSymbol': {'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]}, 'dynamicRegistration': False, 'hierarchicalDocumentSymbolSupport': True}, 'references': {'dynamicRegistration': False}, 'documentHighlight': {'dynamicRegistration': False}, 'completion': {'completionItem': {'snippetSupport': False, 'commitCharactersSupport': False, 'preselectSupport': False, 'deprecatedSupport': False, 'documentationFormat': ['markdown', 'plaintext']}, 'contextSupport': False, 'dynamicRegistration': False, '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]}}, 'definition': {'linkSupport': True}, 'synchronization': {'dynamicRegistration': False, 'willSaveWaitUntil': False, 'willSave': False, 'didSave': True}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['', 'Empty', 'QuickFix', 'Refactor', 'RefactorExtract', 'RefactorInline', 'RefactorRewrite', 'Source', 'SourceOrganizeImports', 'quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source', 'source.organizeImports']}}, 'dynamicRegistration': False}, 'rename': {'prepareSupport': True, 'dynamicRegistration': False}, 'signatureHelp': {'signatureInformation': {'documentationFormat': ['markdown', 'plaintext']}, 'dynamicRegistration': False}, 'hover': {'dynamicRegistration': False, 'contentFormat': ['markdown', 'plaintext']}, 'publishDiagnostics': {'relatedInformation': True, 'tagSupport': {'valueSet': [1, 2]}}, 'implementation': {'linkSupport': True}, 'typeDefinition': {'linkSupport': True}}}}}
2021-06-28 12:25:39,769 [DEBUG] Language server initialized with 19368 file:///C:/Work/MEGA/Portable/GHDL/bin/src_test C:\Work\MEGA\Portable\GHDL\bin\src_test {}
2021-06-28 12:25:39,771 [INFO] reading project file C:\Work\MEGA\Portable\GHDL\bin\src_test\hdl-prj.json
2021-06-28 12:25:39,771 [INFO] Using options: ['--workdir=work', '--ieee=synopsys', '-fexplicit', '--warn-library', '--warn-default-binding', '--warn-binding', '--warn-reserved', '--warn-nested-comment', '--warn-parenthesis', '--warn-vital-generic', '--warn-delayed-checks', '--warn-body', '--warn-specs', '--warn-runtime-error', '--warn-shared', '--warn-hide', '--warn-unused', '--warn-others', '--warn-pure', '--warn-static']
2021-06-28 12:25:39,774 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd
2021-06-28 12:25:39,776 [DEBUG] add_to_library(824) -> 954
2021-06-28 12:25:39,776 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP_2.vhd
2021-06-28 12:25:39,777 [DEBUG] add_to_library(956) -> 1058
2021-06-28 12:25:39,778 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/TEST.vhd
2021-06-28 12:25:39,792 [DEBUG] add_to_library(1060) -> 15622
2021-06-28 12:25:39,792 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/Sub/ENTITY_1.vhd
2021-06-28 12:25:39,793 [DEBUG] add_to_library(15624) -> 15748
2021-06-28 12:25:39,793 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/Sub/ENTITY_2.vhd
2021-06-28 12:25:39,794 [DEBUG] add_to_library(15750) -> 15872
2021-06-28 12:25:39,794 [DEBUG] Response: {'capabilities': {'textDocumentSync': {'openClose': True, 'change': 2, 'save': {'includeText': True}}, 'hoverProvider': False, 'definitionProvider': True, 'referencesProvider': False, 'documentHighlightProvider': False, 'documentSymbolProvider': True, 'codeActionProvider': False, 'documentFormattingProvider': False, 'documentRangeFormattingProvider': True, 'renameProvider': False}}
2021-06-28 12:25:39,795 [DEBUG] Headers: {'Content-Length': '57'}
2021-06-28 12:25:39,795 [DEBUG] Read msg: {'method': 'initialized', 'jsonrpc': '2.0', 'params': {}}
2021-06-28 12:25:39,795 [DEBUG] Headers: {'Content-Length': '2037'}
2021-06-28 12:25:39,796 [DEBUG] Read msg: {'method': 'textDocument/didOpen', 'jsonrpc': '2.0', 'params': {'textDocument': {'uri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd', 'version': 0, 'languageId': 'vhdl', 'text': "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n"}}}
2021-06-28 12:25:39,796 [DEBUG] parse doc 9 file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd
2021-06-28 12:25:39,796 [DEBUG] add_to_library(15874) -> 16004
2021-06-28 12:25:42,137 [DEBUG] Headers: {'Content-Length': '49'}
2021-06-28 12:25:42,137 [DEBUG] Read msg: {'method': 'shutdown', 'jsonrpc': '2.0', 'id': 2}
2021-06-28 12:25:42,137 [DEBUG] Response: None

@tgingold
Copy link
Member

But in the last log, there is no crash.

@pidgeon777
Copy link
Author

pidgeon777 commented Jun 30, 2021

More in detail, these are all of the tests I did. In each of those, opening ENTITY_TOP.vhd file was the only thing done, and nothing else.

Setup A

hdl-prj.json:

{
    "options": {
        "ghdl_analysis": [
            "--workdir=work",
            "--ieee=synopsys",
            "-fexplicit",
            "--warn-library",
            "--warn-default-binding",
            "--warn-binding",
            "--warn-reserved",
            "--warn-nested-comment",
            "--warn-parenthesis",
            "--warn-vital-generic",
            "--warn-delayed-checks",
            "--warn-body",
            "--warn-specs",
            "--warn-runtime-error",
            "--warn-shared",
            "--warn-hide",
            "--warn-unused",
            "--warn-others",
            "--warn-pure",
            "--warn-static"
        ]
    },
    "files": [
        { "file": "C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd", "language": "vhdl" },
        { "file": "C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP_2.vhd", "language": "vhdl" },
        { "file": "C:/Work/MEGA/Portable/GHDL/bin/src_test/TEST.vhd", "language": "vhdl" },
        { "file": "C:/Work/MEGA/Portable/GHDL/bin/src_test/Sub/ENTITY_1.vhd", "language": "vhdl" },
        { "file": "C:/Work/MEGA/Portable/GHDL/bin/src_test/Sub/ENTITY_2.vhd", "language": "vhdl" }
    ] 
}

LSP command:

cmd = {"ghdl-ls", "--verbose", "--verbose", "--log-file", "vhdl-ls.log", "--trace-file", "vhdl-ls.trace"},

Results:

vhdl-ls.log:

2021-06-30 09:18:37,977 [INFO] Args: ['C:\\msys64\\mingw64\\bin\\ghdl-ls', '--verbose', '--verbose', '--log-file', 'vhdl-ls.log', '--trace-file', 'vhdl-ls.trace']
2021-06-30 09:18:37,977 [INFO] Current directory is C:\Work\MEGA\Portable

lsp.log:

[ START ] 2021-06-30T09:23:00+0200 ] LSP logging initiated
[ INFO ] 2021-06-30T09:23:05+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:311 ]	"Starting RPC client"	{  args = { "--verbose", "--verbose", "--log-file", "vhdl-ls.log", "--trace-file", "vhdl-ls.trace" },  cmd = "ghdl-ls",  extra = {}}
[ DEBUG ] 2021-06-30T09:23:05+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:826 ]	"LSP[ghdl_ls]"	"initialize_params"	{  capabilities = {    callHierarchy = {      dynamicRegistration = false,      <metatable> = <1>{        __tostring = <function 1>      }    },    textDocument = {      codeAction = {        codeActionLiteralSupport = {          codeActionKind = {            valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        dynamicRegistration = false,        <metatable> = <table 1>      },      completion = {        completionItem = {          commitCharactersSupport = false,          deprecatedSupport = false,          documentationFormat = { "markdown", "plaintext" },          preselectSupport = false,          snippetSupport = false,          <metatable> = <table 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 },          <metatable> = <table 1>        },        contextSupport = false,        dynamicRegistration = false,        <metatable> = <table 1>      },      declaration = {        linkSupport = true,        <metatable> = <table 1>      },      definition = {        linkSupport = true,        <metatable> = <table 1>      },      documentHighlight = {        dynamicRegistration = false,        <metatable> = <table 1>      },      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 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      hover = {        contentFormat = { "markdown", "plaintext" },        dynamicRegistration = false,        <metatable> = <table 1>      },      implementation = {        linkSupport = true,        <metatable> = <table 1>      },      publishDiagnostics = {        relatedInformation = true,        tagSupport = {          valueSet = { 1, 2 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      references = {        dynamicRegistration = false,        <metatable> = <table 1>      },      rename = {        dynamicRegistration = false,        prepareSupport = true,        <metatable> = <table 1>      },      signatureHelp = {        dynamicRegistration = false,        signatureInformation = {          documentationFormat = { "markdown", "plaintext" },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      synchronization = {        didSave = true,        dynamicRegistration = false,        willSave = false,        willSaveWaitUntil = false,        <metatable> = <table 1>      },      typeDefinition = {        linkSupport = true,        <metatable> = <table 1>      },      <metatable> = <table 1>    },    window = {      showDocument = {        support = false,        <metatable> = <table 1>      },      showMessage = {        messageActionItem = {          additionalPropertiesSupport = false,          <metatable> = <table 1>        },        <metatable> = <table 1>      },      workDoneProgress = true,      <metatable> = <table 1>    },    workspace = {      applyEdit = true,      configuration = 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 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      workspaceEdit = {        resourceOperations = { "rename", "create", "delete" },        <metatable> = <table 1>      },      workspaceFolders = true,      <metatable> = <table 1>    }  },  clientInfo = {    name = "Neovim",    version = "0.5.0"  },  initializationOptions = vim.empty_dict(),  processId = 24680,  rootPath = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",  rootUri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test",  trace = "off",  workspaceFolders = { {      name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",      uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"    } }}
[ DEBUG ] 2021-06-30T09:23:05+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      callHierarchy = {        dynamicRegistration = false,        <metatable> = <1>{          __tostring = <function 1>        }      },      textDocument = {        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },              <metatable> = <table 1>            },            <metatable> = <table 1>          },          dynamicRegistration = false,          <metatable> = <table 1>        },        completion = {          completionItem = {            commitCharactersSupport = false,            deprecatedSupport = false,            documentationFormat = { "markdown", "plaintext" },            preselectSupport = false,            snippetSupport = false,            <metatable> = <table 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 },            <metatable> = <table 1>          },          contextSupport = false,          dynamicRegistration = false,          <metatable> = <table 1>        },        declaration = {          linkSupport = true,          <metatable> = <table 1>        },        definition = {          linkSupport = true,          <metatable> = <table 1>        },        documentHighlight = {          dynamicRegistration = false,          <metatable> = <table 1>        },        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 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = false,          <metatable> = <table 1>        },        implementation = {          linkSupport = true,          <metatable> = <table 1>        },        publishDiagnostics = {          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        references = {          dynamicRegistration = false,          <metatable> = <table 1>        },        rename = {          dynamicRegistration = false,          prepareSupport = true,          <metatable> = <table 1>        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            documentationFormat = { "markdown", "plaintext" },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = false,          willSaveWaitUntil = false,          <metatable> = <table 1>        },        typeDefinition = {          linkSupport = true,          <metatable> = <table 1>        },        <metatable> = <table 1>      },      window = {        showDocument = {          support = false,          <metatable> = <table 1>        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false,            <metatable> = <table 1>          },          <metatable> = <table 1>        },        workDoneProgress = true,        <metatable> = <table 1>      },      workspace = {        applyEdit = true,        configuration = 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 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" },          <metatable> = <table 1>        },        workspaceFolders = true,        <metatable> = <table 1>      }    },    clientInfo = {      name = "Neovim",      version = "0.5.0"    },    initializationOptions = vim.empty_dict(),    processId = 24680,    rootPath = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",    rootUri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test",    trace = "off",    workspaceFolders = { {        name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",        uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"      } }  }}
[ ERROR ] 2021-06-30T09:23:05+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:457 ]	"rpc"	"ghdl-ls"	"stderr"	"Args: ['C:\\\\msys64\\\\mingw64\\\\bin\\\\ghdl-ls', '--verbose', '--verbose', '--log-file', 'vhdl-ls.log', '--trace-file', 'vhdl-ls.trace']\r\nCurrent directory: C:\\Work\\MEGA\\Portable\r\n"
[ ERROR ] 2021-06-30T09:23:05+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:457 ]	"rpc"	"ghdl-ls"	"stderr"	"Traceback (most recent call last):\r\n  File \"C:\\msys64\\mingw64\\bin\\ghdl-ls-script.py\", line 33, in <module>\r\n    sys.exit(load_entry_point('pyGHDL==2.0.0.dev0', 'console_scripts', 'ghdl-ls')())\r\n  File \"C:\\msys64\\mingw64\\lib\\python3.8\\site-packages\\pyGHDL\\cli\\lsp.py\", line 143, in main\r\n    __rotate_log_files(trace_file + \".in\", 5)\r\n  File \"C:\\msys64\\mingw64\\lib\\python3.8\\site-packages\\pyGHDL\\cli\\lsp.py\", line 58, in __rotate_log_files\r\n    os.rename(oldfile, \"{}.{}\".format(basename, i))\r\nFileExistsError: [WinError 183] Impossibile creare un file, se il file esiste gi?'vhdl-ls.trace.in.4' -> 'vhdl-ls.trace.in.5'\r\n"
[ INFO ] 2021-06-30T09:23:08+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:1213 ]	"exit_handler"	{}

GHDL-LS crashed because the vhdl-ls.trace.in.5 and vhdl-ls.trace.out.5 files already existed, according to the log above.

This should be classified as a bug I think (it can append 1 to 5 to the trace file names, but not beyond, resulting in a crash).

Anyway, after having deleted those files and restarted the test, we obtain:

vhdl-ls.log:

2021-06-30 09:30:16,013 [INFO] Args: ['C:\\msys64\\mingw64\\bin\\ghdl-ls', '--verbose', '--verbose', '--log-file', 'vhdl-ls.log', '--trace-file', 'vhdl-ls.trace']
2021-06-30 09:30:16,013 [INFO] Current directory is C:\Work\MEGA\Portable
2021-06-30 09:30:16,018 [DEBUG] Headers: {'Content-Length': '2742'}
2021-06-30 09:30:16,018 [DEBUG] Read msg: {'id': 1, 'jsonrpc': '2.0', 'method': 'initialize', 'params': {'initializationOptions': {}, 'rootUri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test', 'workspaceFolders': [{'uri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test', 'name': 'C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test'}], 'rootPath': 'C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test', 'clientInfo': {'version': '0.5.0', 'name': 'Neovim'}, 'processId': 33968, 'trace': 'off', 'capabilities': {'workspace': {'workspaceFolders': True, 'configuration': True, 'workspaceEdit': {'resourceOperations': ['rename', 'create', 'delete']}, 'symbol': {'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]}, 'dynamicRegistration': False, 'hierarchicalWorkspaceSymbolSupport': True}, 'applyEdit': True}, 'window': {'showDocument': {'support': False}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': False}}, 'workDoneProgress': True}, 'callHierarchy': {'dynamicRegistration': False}, 'textDocument': {'publishDiagnostics': {'relatedInformation': True, 'tagSupport': {'valueSet': [1, 2]}}, 'documentSymbol': {'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]}, 'dynamicRegistration': False, 'hierarchicalDocumentSymbolSupport': True}, 'references': {'dynamicRegistration': False}, 'documentHighlight': {'dynamicRegistration': False}, 'rename': {'prepareSupport': True, 'dynamicRegistration': False}, 'synchronization': {'didSave': True, 'willSaveWaitUntil': False, 'willSave': False, 'dynamicRegistration': False}, 'completion': {'completionItem': {'snippetSupport': False, 'commitCharactersSupport': False, 'preselectSupport': False, 'deprecatedSupport': False, 'documentationFormat': ['markdown', 'plaintext']}, 'contextSupport': False, 'dynamicRegistration': False, '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]}}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['', 'Empty', 'QuickFix', 'Refactor', 'RefactorExtract', 'RefactorInline', 'RefactorRewrite', 'Source', 'SourceOrganizeImports', 'quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source', 'source.organizeImports']}}, 'dynamicRegistration': False}, 'signatureHelp': {'signatureInformation': {'documentationFormat': ['markdown', 'plaintext']}, 'dynamicRegistration': False}, 'typeDefinition': {'linkSupport': True}, 'hover': {'dynamicRegistration': False, 'contentFormat': ['markdown', 'plaintext']}, 'declaration': {'linkSupport': True}, 'implementation': {'linkSupport': True}, 'definition': {'linkSupport': True}}}}}
2021-06-30 09:30:16,018 [DEBUG] Language server initialized with 33968 file:///C:/Work/MEGA/Portable/GHDL/bin/src_test C:\Work\MEGA\Portable\GHDL\bin\src_test {}
2021-06-30 09:30:16,020 [INFO] reading project file C:\Work\MEGA\Portable\GHDL\bin\src_test\hdl-prj.json
2021-06-30 09:30:16,020 [INFO] Using options: ['--workdir=work', '--ieee=synopsys', '-fexplicit', '--warn-library', '--warn-default-binding', '--warn-binding', '--warn-reserved', '--warn-nested-comment', '--warn-parenthesis', '--warn-vital-generic', '--warn-delayed-checks', '--warn-body', '--warn-specs', '--warn-runtime-error', '--warn-shared', '--warn-hide', '--warn-unused', '--warn-others', '--warn-pure', '--warn-static']
2021-06-30 09:30:16,022 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd
2021-06-30 09:30:16,023 [DEBUG] add_to_library(824) -> 954
2021-06-30 09:30:16,023 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP_2.vhd
2021-06-30 09:30:16,024 [DEBUG] add_to_library(956) -> 1058
2021-06-30 09:30:16,024 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/TEST.vhd
2021-06-30 09:30:16,033 [DEBUG] add_to_library(1060) -> 15622
2021-06-30 09:30:16,033 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/Sub/ENTITY_1.vhd
2021-06-30 09:30:16,034 [DEBUG] add_to_library(15624) -> 15748
2021-06-30 09:30:16,034 [INFO] loading C:/Work/MEGA/Portable/GHDL/bin/src_test/Sub/ENTITY_2.vhd
2021-06-30 09:30:16,035 [DEBUG] add_to_library(15750) -> 15872
2021-06-30 09:30:16,035 [DEBUG] Response: {'capabilities': {'textDocumentSync': {'openClose': True, 'change': 2, 'save': {'includeText': True}}, 'hoverProvider': False, 'definitionProvider': True, 'referencesProvider': False, 'documentHighlightProvider': False, 'documentSymbolProvider': True, 'codeActionProvider': False, 'documentFormattingProvider': False, 'documentRangeFormattingProvider': True, 'renameProvider': False}}
2021-06-30 09:30:16,037 [DEBUG] Headers: {'Content-Length': '57'}
2021-06-30 09:30:16,037 [DEBUG] Read msg: {'method': 'initialized', 'jsonrpc': '2.0', 'params': {}}
2021-06-30 09:30:16,037 [DEBUG] Headers: {'Content-Length': '2037'}
2021-06-30 09:30:16,037 [DEBUG] Read msg: {'method': 'textDocument/didOpen', 'jsonrpc': '2.0', 'params': {'textDocument': {'uri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd', 'version': 0, 'languageId': 'vhdl', 'text': "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n"}}}
2021-06-30 09:30:16,037 [DEBUG] parse doc 9 file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd
2021-06-30 09:30:16,038 [DEBUG] add_to_library(15874) -> 16004
2021-06-30 09:30:17,995 [DEBUG] Headers: {'Content-Length': '49'}
2021-06-30 09:30:17,996 [DEBUG] Read msg: {'id': 2, 'jsonrpc': '2.0', 'method': 'shutdown'}
2021-06-30 09:30:17,996 [DEBUG] Response: None

vhdl-ls.trace.in:

Content-Length: 2742



{"id": 1, "jsonrpc": "2.0", "method": "initialize", "params": {"initializationOptions": {}, "rootUri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test", "workspaceFolders": [{"uri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test", "name": "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test"}], "rootPath": "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test", "clientInfo": {"version": "0.5.0", "name": "Neovim"}, "processId": 33968, "trace": "off", "capabilities": {"workspace": {"workspaceFolders": true, "configuration": true, "workspaceEdit": {"resourceOperations": ["rename", "create", "delete"]}, "symbol": {"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]}, "dynamicRegistration": false, "hierarchicalWorkspaceSymbolSupport": true}, "applyEdit": true}, "window": {"showDocument": {"support": false}, "showMessage": {"messageActionItem": {"additionalPropertiesSupport": false}}, "workDoneProgress": true}, "callHierarchy": {"dynamicRegistration": false}, "textDocument": {"publishDiagnostics": {"relatedInformation": true, "tagSupport": {"valueSet": [1, 2]}}, "documentSymbol": {"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]}, "dynamicRegistration": false, "hierarchicalDocumentSymbolSupport": true}, "references": {"dynamicRegistration": false}, "documentHighlight": {"dynamicRegistration": false}, "rename": {"prepareSupport": true, "dynamicRegistration": false}, "synchronization": {"didSave": true, "willSaveWaitUntil": false, "willSave": false, "dynamicRegistration": false}, "completion": {"completionItem": {"snippetSupport": false, "commitCharactersSupport": false, "preselectSupport": false, "deprecatedSupport": false, "documentationFormat": ["markdown", "plaintext"]}, "contextSupport": false, "dynamicRegistration": false, "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]}}, "codeAction": {"codeActionLiteralSupport": {"codeActionKind": {"valueSet": ["", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration": false}, "signatureHelp": {"signatureInformation": {"documentationFormat": ["markdown", "plaintext"]}, "dynamicRegistration": false}, "typeDefinition": {"linkSupport": true}, "hover": {"dynamicRegistration": false, "contentFormat": ["markdown", "plaintext"]}, "declaration": {"linkSupport": true}, "implementation": {"linkSupport": true}, "definition": {"linkSupport": true}}}}}Content-Length: 57



{"method": "initialized", "jsonrpc": "2.0", "params": {}}Content-Length: 2037



{"method": "textDocument/didOpen", "jsonrpc": "2.0", "params": {"textDocument": {"uri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd", "version": 0, "languageId": "vhdl", "text": "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n"}}}Content-Length: 49



{"id": 2, "jsonrpc": "2.0", "method": "shutdown"}

vhdl-ls.trace.out:

Content-Length: 392



{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{"includeText":true}},"hoverProvider":false,"definitionProvider":true,"referencesProvider":false,"documentHighlightProvider":false,"documentSymbolProvider":true,"codeActionProvider":false,"documentFormattingProvider":false,"documentRangeFormattingProvider":true,"renameProvider":false}}}Content-Length: 556



{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd","diagnostics":[{"source":"ghdl","range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"message":"entity \"entity_top\" was also defined in file \"C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd\"","severity":2},{"source":"ghdl","range":{"start":{"line":84,"character":2},"end":{"line":84,"character":2}},"message":"infinite loop for this process without a wait statement","severity":2}]}}Content-Length: 38



{"jsonrpc":"2.0","id":2,"result":null}

lsp.log:

[ START ] 2021-06-30T09:29:52+0200 ] LSP logging initiated
[ INFO ] 2021-06-30T09:30:15+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:311 ]	"Starting RPC client"	{  args = { "--verbose", "--verbose", "--log-file", "vhdl-ls.log", "--trace-file", "vhdl-ls.trace" },  cmd = "ghdl-ls",  extra = {}}
[ DEBUG ] 2021-06-30T09:30:15+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:826 ]	"LSP[ghdl_ls]"	"initialize_params"	{  capabilities = {    callHierarchy = {      dynamicRegistration = false,      <metatable> = <1>{        __tostring = <function 1>      }    },    textDocument = {      codeAction = {        codeActionLiteralSupport = {          codeActionKind = {            valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        dynamicRegistration = false,        <metatable> = <table 1>      },      completion = {        completionItem = {          commitCharactersSupport = false,          deprecatedSupport = false,          documentationFormat = { "markdown", "plaintext" },          preselectSupport = false,          snippetSupport = false,          <metatable> = <table 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 },          <metatable> = <table 1>        },        contextSupport = false,        dynamicRegistration = false,        <metatable> = <table 1>      },      declaration = {        linkSupport = true,        <metatable> = <table 1>      },      definition = {        linkSupport = true,        <metatable> = <table 1>      },      documentHighlight = {        dynamicRegistration = false,        <metatable> = <table 1>      },      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 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      hover = {        contentFormat = { "markdown", "plaintext" },        dynamicRegistration = false,        <metatable> = <table 1>      },      implementation = {        linkSupport = true,        <metatable> = <table 1>      },      publishDiagnostics = {        relatedInformation = true,        tagSupport = {          valueSet = { 1, 2 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      references = {        dynamicRegistration = false,        <metatable> = <table 1>      },      rename = {        dynamicRegistration = false,        prepareSupport = true,        <metatable> = <table 1>      },      signatureHelp = {        dynamicRegistration = false,        signatureInformation = {          documentationFormat = { "markdown", "plaintext" },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      synchronization = {        didSave = true,        dynamicRegistration = false,        willSave = false,        willSaveWaitUntil = false,        <metatable> = <table 1>      },      typeDefinition = {        linkSupport = true,        <metatable> = <table 1>      },      <metatable> = <table 1>    },    window = {      showDocument = {        support = false,        <metatable> = <table 1>      },      showMessage = {        messageActionItem = {          additionalPropertiesSupport = false,          <metatable> = <table 1>        },        <metatable> = <table 1>      },      workDoneProgress = true,      <metatable> = <table 1>    },    workspace = {      applyEdit = true,      configuration = 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 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      workspaceEdit = {        resourceOperations = { "rename", "create", "delete" },        <metatable> = <table 1>      },      workspaceFolders = true,      <metatable> = <table 1>    }  },  clientInfo = {    name = "Neovim",    version = "0.5.0"  },  initializationOptions = vim.empty_dict(),  processId = 33968,  rootPath = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",  rootUri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test",  trace = "off",  workspaceFolders = { {      name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",      uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"    } }}
[ DEBUG ] 2021-06-30T09:30:15+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      callHierarchy = {        dynamicRegistration = false,        <metatable> = <1>{          __tostring = <function 1>        }      },      textDocument = {        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },              <metatable> = <table 1>            },            <metatable> = <table 1>          },          dynamicRegistration = false,          <metatable> = <table 1>        },        completion = {          completionItem = {            commitCharactersSupport = false,            deprecatedSupport = false,            documentationFormat = { "markdown", "plaintext" },            preselectSupport = false,            snippetSupport = false,            <metatable> = <table 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 },            <metatable> = <table 1>          },          contextSupport = false,          dynamicRegistration = false,          <metatable> = <table 1>        },        declaration = {          linkSupport = true,          <metatable> = <table 1>        },        definition = {          linkSupport = true,          <metatable> = <table 1>        },        documentHighlight = {          dynamicRegistration = false,          <metatable> = <table 1>        },        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 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = false,          <metatable> = <table 1>        },        implementation = {          linkSupport = true,          <metatable> = <table 1>        },        publishDiagnostics = {          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        references = {          dynamicRegistration = false,          <metatable> = <table 1>        },        rename = {          dynamicRegistration = false,          prepareSupport = true,          <metatable> = <table 1>        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            documentationFormat = { "markdown", "plaintext" },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = false,          willSaveWaitUntil = false,          <metatable> = <table 1>        },        typeDefinition = {          linkSupport = true,          <metatable> = <table 1>        },        <metatable> = <table 1>      },      window = {        showDocument = {          support = false,          <metatable> = <table 1>        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false,            <metatable> = <table 1>          },          <metatable> = <table 1>        },        workDoneProgress = true,        <metatable> = <table 1>      },      workspace = {        applyEdit = true,        configuration = 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 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" },          <metatable> = <table 1>        },        workspaceFolders = true,        <metatable> = <table 1>      }    },    clientInfo = {      name = "Neovim",      version = "0.5.0"    },    initializationOptions = vim.empty_dict(),    processId = 33968,    rootPath = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",    rootUri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test",    trace = "off",    workspaceFolders = { {        name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",        uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"      } }  }}
[ DEBUG ] 2021-06-30T09:30:16+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:491 ]	"decoded"	{  id = 1,  jsonrpc = "2.0",  result = {    capabilities = {      codeActionProvider = false,      definitionProvider = true,      documentFormattingProvider = false,      documentHighlightProvider = false,      documentRangeFormattingProvider = true,      documentSymbolProvider = true,      hoverProvider = false,      referencesProvider = false,      renameProvider = false,      textDocumentSync = {        change = 2,        openClose = true,        save = {          includeText = true        }      }    }  }}
[ DEBUG ] 2021-06-30T09:30:16+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  jsonrpc = "2.0",  method = "initialized",  params = {    [true] = 6  }}
[ DEBUG ] 2021-06-30T09:30:16+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:853 ]	"LSP[ghdl_ls]"	"server_capabilities"	{  codeActionProvider = false,  definitionProvider = true,  documentFormattingProvider = false,  documentHighlightProvider = false,  documentRangeFormattingProvider = true,  documentSymbolProvider = true,  hoverProvider = false,  referencesProvider = false,  renameProvider = false,  textDocumentSync = {    change = 2,    openClose = true,    save = {      includeText = true    }  }}
[ INFO ] 2021-06-30T09:30:16+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:854 ]	"LSP[ghdl_ls]"	"initialized"	{  resolved_capabilities = {    call_hierarchy = false,    code_action = false,    code_lens = false,    code_lens_resolve = false,    completion = false,    declaration = false,    document_formatting = false,    document_highlight = false,    document_range_formatting = true,    document_symbol = true,    execute_command = false,    find_references = false,    goto_definition = true,    hover = false,    implementation = false,    rename = false,    signature_help = false,    signature_help_trigger_characters = {},    text_document_did_change = 2,    text_document_open_close = true,    text_document_save = {      includeText = true    },    text_document_save_include_text = true,    text_document_will_save = false,    text_document_will_save_wait_until = false,    type_definition = false,    workspace_folder_properties = {      changeNotifications = false,      supported = false    },    workspace_symbol = false  }}
[ DEBUG ] 2021-06-30T09:30:16+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  jsonrpc = "2.0",  method = "textDocument/didOpen",  params = {    textDocument = {      languageId = "vhdl",      text = "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n",      uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd",      version = 0    }  }}
[ DEBUG ] 2021-06-30T09:30:16+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:491 ]	"decoded"	{  jsonrpc = "2.0",  method = "textDocument/publishDiagnostics",  params = {    diagnostics = { {        message = 'entity "entity_top" was also defined in file "C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd"',        range = {          end = {            character = 0,            line = 0          },          start = {            character = 0,            line = 0          }        },        severity = 2,        source = "ghdl"      }, {        message = "infinite loop for this process without a wait statement",        range = {          end = {            character = 2,            line = 84          },          start = {            character = 2,            line = 84          }        },        severity = 2,        source = "ghdl"      } },    uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd"  }}
[ DEBUG ] 2021-06-30T09:30:16+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:679 ]	"notification"	"textDocument/publishDiagnostics"	{  diagnostics = { {      message = 'entity "entity_top" was also defined in file "C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd"',      range = {        end = {          character = 0,          line = 0        },        start = {          character = 0,          line = 0        }      },      severity = 2,      source = "ghdl"    }, {      message = "infinite loop for this process without a wait statement",      range = {        end = {          character = 2,          line = 84        },        start = {          character = 2,          line = 84        }      },      severity = 2,      source = "ghdl"    } },  uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd"}
[ WARN ] 2021-06-30T09:30:16+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:86 ]	"method textDocument/codeAction is not supported by any of the servers registered for the current buffer"
[ INFO ] 2021-06-30T09:30:17+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:1213 ]	"exit_handler"	{ {    _on_attach = <function 1>,    cancel_request = <function 2>,    config = {      _on_attach = <function 3>,      capabilities = {        callHierarchy = {          dynamicRegistration = false,          <metatable> = <1>{            __tostring = <function 4>          }        },        textDocument = {          codeAction = {            codeActionLiteralSupport = {              codeActionKind = {                valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },                <metatable> = <table 1>              },              <metatable> = <table 1>            },            dynamicRegistration = false,            <metatable> = <table 1>          },          completion = {            completionItem = {              commitCharactersSupport = false,              deprecatedSupport = false,              documentationFormat = { "markdown", "plaintext" },              preselectSupport = false,              snippetSupport = false,              <metatable> = <table 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 },              <metatable> = <table 1>            },            contextSupport = false,            dynamicRegistration = false,            <metatable> = <table 1>          },          declaration = {            linkSupport = true,            <metatable> = <table 1>          },          definition = {            linkSupport = true,            <metatable> = <table 1>          },          documentHighlight = {            dynamicRegistration = false,            <metatable> = <table 1>          },          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 },              <metatable> = <table 1>            },            <metatable> = <table 1>          },          hover = {            contentFormat = { "markdown", "plaintext" },            dynamicRegistration = false,            <metatable> = <table 1>          },          implementation = {            linkSupport = true,            <metatable> = <table 1>          },          publishDiagnostics = {            relatedInformation = true,            tagSupport = {              valueSet = { 1, 2 },              <metatable> = <table 1>            },            <metatable> = <table 1>          },          references = {            dynamicRegistration = false,            <metatable> = <table 1>          },          rename = {            dynamicRegistration = false,            prepareSupport = true,            <metatable> = <table 1>          },          signatureHelp = {            dynamicRegistration = false,            signatureInformation = {              documentationFormat = { "markdown", "plaintext" },              <metatable> = <table 1>            },            <metatable> = <table 1>          },          synchronization = {            didSave = true,            dynamicRegistration = false,            willSave = false,            willSaveWaitUntil = false,            <metatable> = <table 1>          },          typeDefinition = {            linkSupport = true,            <metatable> = <table 1>          },          <metatable> = <table 1>        },        window = {          showDocument = {            support = false,            <metatable> = <table 1>          },          showMessage = {            messageActionItem = {              additionalPropertiesSupport = false,              <metatable> = <table 1>            },            <metatable> = <table 1>          },          workDoneProgress = true,          <metatable> = <table 1>        },        workspace = {          applyEdit = true,          configuration = 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 },              <metatable> = <table 1>            },            <metatable> = <table 1>          },          workspaceEdit = {            resourceOperations = { "rename", "create", "delete" },            <metatable> = <table 1>          },          workspaceFolders = true,          <metatable> = <table 1>        }      },      cmd = { "ghdl-ls", "--verbose", "--verbose", "--log-file", "vhdl-ls.log", "--trace-file", "vhdl-ls.trace" },      filetypes = { "vhdl" },      flags = {},      get_language_id = <function 5>,      handlers = <2>{},      init_options = vim.empty_dict(),      log_level = 2,      message_level = 2,      name = "ghdl_ls",      on_attach = <function 6>,      on_exit = <function 7>,      on_init = <function 8>,      root_dir = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",      settings = vim.empty_dict(),      <metatable> = <table 1>    },    handlers = <table 2>,    id = 1,    initialized = true,    is_stopped = <function 9>,    messages = {      messages = {},      name = "ghdl_ls",      progress = {},      status = {}    },    name = "ghdl_ls",    notify = <function 10>,    offset_encoding = "utf-16",    request = <function 11>,    request_sync = <function 12>,    resolved_capabilities = {      call_hierarchy = false,      code_action = false,      code_lens = false,      code_lens_resolve = false,      completion = false,      declaration = false,      document_formatting = false,      document_highlight = false,      document_range_formatting = true,      document_symbol = false,      execute_command = false,      find_references = false,      goto_definition = true,      hover = false,      implementation = false,      rename = false,      signature_help = false,      signature_help_trigger_characters = {},      text_document_did_change = 2,      text_document_open_close = true,      text_document_save = <3>{        includeText = true      },      text_document_save_include_text = true,      text_document_will_save = false,      text_document_will_save_wait_until = false,      type_definition = false,      workspace_folder_properties = {        changeNotifications = false,        supported = false      },      workspace_symbol = false    },    rpc = {      handle = <userdata 1>,      notify = <function 13>,      pid = 16036,      request = <function 14>    },    server_capabilities = {      codeActionProvider = false,      definitionProvider = true,      documentFormattingProvider = false,      documentHighlightProvider = false,      documentRangeFormattingProvider = true,      documentSymbolProvider = true,      hoverProvider = false,      referencesProvider = false,      renameProvider = false,      textDocumentSync = {        change = 2,        openClose = true,        save = <table 3>      }    },    stop = <function 15>,    supports_method = <function 16>,    workspaceFolders = { {        name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",        uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"      } },    workspace_did_change_configuration = <function 17>  } }
[ DEBUG ] 2021-06-30T09:30:17+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  id = 2,  jsonrpc = "2.0",  method = "shutdown"}
[ DEBUG ] 2021-06-30T09:30:17+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:491 ]	"decoded"	{  id = 2,  jsonrpc = "2.0",  result = vim.NIL}
[ DEBUG ] 2021-06-30T09:30:17+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  jsonrpc = "2.0",  method = "exit"}
[ ERROR ] 2021-06-30T09:30:17+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:457 ]	"rpc"	"ghdl-ls"	"stderr"	"Args: ['C:\\\\msys64\\\\mingw64\\\\bin\\\\ghdl-ls', '--verbose', '--verbose', '--log-file', 'vhdl-ls.log', '--trace-file', 'vhdl-ls.trace']\r\nCurrent directory: C:\\Work\\MEGA\\Portable\r\n"

The third row of vhdl-ls.trace.out is:

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd","diagnostics":[{"source":"ghdl","range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"message":"entity \"entity_top\" was also defined in file \"C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd\"","severity":2},{"source":"ghdl","range":{"start":{"line":84,"character":2},"end":{"line":84,"character":2}},"message":"infinite loop for this process without a wait statement","severity":2}]}}Content-Length: 38

This is a bug because the full path of ENTITY_TOP.vhd is defined in hdl-prj.json file, but when opening it, it is detected by GHDL-LS as not belonging to the project files, instead.

What I mean is that, if a file listed in hdl-prj.json is opened, GHDL-LS should not detect and report it as if didn't belong to the project.

In my opinion, this is due to the way GHDL-LS handles Windows paths, but I'm not sure about this.

Setup B

Here I only changed the paths of the source files, going from absolute to relative (to the location of hdl-prj.json file).

hdl-prj.json:

{
    "options": {
        "ghdl_analysis": [
            "--workdir=work",
            "--ieee=synopsys",
            "-fexplicit",
            "--warn-library",
            "--warn-default-binding",
            "--warn-binding",
            "--warn-reserved",
            "--warn-nested-comment",
            "--warn-parenthesis",
            "--warn-vital-generic",
            "--warn-delayed-checks",
            "--warn-body",
            "--warn-specs",
            "--warn-runtime-error",
            "--warn-shared",
            "--warn-hide",
            "--warn-unused",
            "--warn-others",
            "--warn-pure",
            "--warn-static"
        ]
    },
    "files": [
        { "file": "ENTITY_TOP.vhd", "language": "vhdl" },
        { "file": "ENTITY_TOP_2.vhd", "language": "vhdl" },
        { "file": "TEST.vhd", "language": "vhdl" },
        { "file": "Sub/ENTITY_1.vhd", "language": "vhdl" },
        { "file": "Sub/ENTITY_2.vhd", "language": "vhdl" }
    ] 
}

Results:

vhdl-ls.log:

2021-06-30 09:43:53,710 [INFO] Args: ['C:\\msys64\\mingw64\\bin\\ghdl-ls', '--verbose', '--verbose', '--log-file', 'vhdl-ls.log', '--trace-file', 'vhdl-ls.trace']
2021-06-30 09:43:53,711 [INFO] Current directory is C:\Work\MEGA\Portable
2021-06-30 09:43:53,713 [DEBUG] Headers: {'Content-Length': '2741'}
2021-06-30 09:43:53,714 [DEBUG] Read msg: {'id': 1, 'jsonrpc': '2.0', 'method': 'initialize', 'params': {'rootUri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test', 'initializationOptions': {}, 'workspaceFolders': [{'uri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test', 'name': 'C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test'}], 'rootPath': 'C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test', 'clientInfo': {'version': '0.5.0', 'name': 'Neovim'}, 'processId': 6124, 'trace': 'off', 'capabilities': {'callHierarchy': {'dynamicRegistration': False}, 'window': {'showDocument': {'support': False}, 'showMessage': {'messageActionItem': {'additionalPropertiesSupport': False}}, 'workDoneProgress': True}, 'workspace': {'workspaceFolders': True, 'workspaceEdit': {'resourceOperations': ['rename', 'create', 'delete']}, 'applyEdit': True, 'symbol': {'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]}, 'dynamicRegistration': False, 'hierarchicalWorkspaceSymbolSupport': True}, 'configuration': True}, 'textDocument': {'publishDiagnostics': {'relatedInformation': True, 'tagSupport': {'valueSet': [1, 2]}}, 'documentSymbol': {'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]}, 'dynamicRegistration': False, 'hierarchicalDocumentSymbolSupport': True}, 'references': {'dynamicRegistration': False}, 'documentHighlight': {'dynamicRegistration': False}, 'rename': {'prepareSupport': True, 'dynamicRegistration': False}, 'synchronization': {'dynamicRegistration': False, 'willSaveWaitUntil': False, 'willSave': False, 'didSave': True}, 'completion': {'completionItem': {'preselectSupport': False, 'commitCharactersSupport': False, 'snippetSupport': False, 'deprecatedSupport': False, 'documentationFormat': ['markdown', 'plaintext']}, 'contextSupport': False, 'dynamicRegistration': False, '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]}}, 'codeAction': {'codeActionLiteralSupport': {'codeActionKind': {'valueSet': ['', 'Empty', 'QuickFix', 'Refactor', 'RefactorExtract', 'RefactorInline', 'RefactorRewrite', 'Source', 'SourceOrganizeImports', 'quickfix', 'refactor', 'refactor.extract', 'refactor.inline', 'refactor.rewrite', 'source', 'source.organizeImports']}}, 'dynamicRegistration': False}, 'signatureHelp': {'dynamicRegistration': False, 'signatureInformation': {'documentationFormat': ['markdown', 'plaintext']}}, 'typeDefinition': {'linkSupport': True}, 'hover': {'dynamicRegistration': False, 'contentFormat': ['markdown', 'plaintext']}, 'declaration': {'linkSupport': True}, 'implementation': {'linkSupport': True}, 'definition': {'linkSupport': True}}}}}
2021-06-30 09:43:53,714 [DEBUG] Language server initialized with 6124 file:///C:/Work/MEGA/Portable/GHDL/bin/src_test C:\Work\MEGA\Portable\GHDL\bin\src_test {}
2021-06-30 09:43:53,716 [INFO] reading project file C:\Work\MEGA\Portable\GHDL\bin\src_test\hdl-prj.json
2021-06-30 09:43:53,716 [INFO] Using options: ['--workdir=work', '--ieee=synopsys', '-fexplicit', '--warn-library', '--warn-default-binding', '--warn-binding', '--warn-reserved', '--warn-nested-comment', '--warn-parenthesis', '--warn-vital-generic', '--warn-delayed-checks', '--warn-body', '--warn-specs', '--warn-runtime-error', '--warn-shared', '--warn-hide', '--warn-unused', '--warn-others', '--warn-pure', '--warn-static']
2021-06-30 09:43:53,718 [INFO] loading ENTITY_TOP.vhd
2021-06-30 09:43:53,719 [DEBUG] add_to_library(824) -> 954
2021-06-30 09:43:53,719 [INFO] loading ENTITY_TOP_2.vhd
2021-06-30 09:43:53,720 [DEBUG] add_to_library(956) -> 1058
2021-06-30 09:43:53,720 [INFO] loading TEST.vhd
2021-06-30 09:43:53,730 [DEBUG] add_to_library(1060) -> 15622
2021-06-30 09:43:53,730 [INFO] loading Sub/ENTITY_1.vhd
2021-06-30 09:43:53,731 [DEBUG] add_to_library(15624) -> 15748
2021-06-30 09:43:53,732 [INFO] loading Sub/ENTITY_2.vhd
2021-06-30 09:43:53,732 [DEBUG] add_to_library(15750) -> 15872
2021-06-30 09:43:53,732 [DEBUG] Response: {'capabilities': {'textDocumentSync': {'openClose': True, 'change': 2, 'save': {'includeText': True}}, 'hoverProvider': False, 'definitionProvider': True, 'referencesProvider': False, 'documentHighlightProvider': False, 'documentSymbolProvider': True, 'codeActionProvider': False, 'documentFormattingProvider': False, 'documentRangeFormattingProvider': True, 'renameProvider': False}}
2021-06-30 09:43:53,733 [DEBUG] Headers: {'Content-Length': '57'}
2021-06-30 09:43:53,733 [DEBUG] Read msg: {'method': 'initialized', 'jsonrpc': '2.0', 'params': {}}
2021-06-30 09:43:53,733 [DEBUG] Headers: {'Content-Length': '2037'}
2021-06-30 09:43:53,733 [DEBUG] Read msg: {'method': 'textDocument/didOpen', 'jsonrpc': '2.0', 'params': {'textDocument': {'uri': 'file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd', 'version': 0, 'languageId': 'vhdl', 'text': "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n"}}}

vhdl-ls.trace.in:

Content-Length: 2741



{"id": 1, "jsonrpc": "2.0", "method": "initialize", "params": {"rootUri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test", "initializationOptions": {}, "workspaceFolders": [{"uri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test", "name": "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test"}], "rootPath": "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test", "clientInfo": {"version": "0.5.0", "name": "Neovim"}, "processId": 6124, "trace": "off", "capabilities": {"callHierarchy": {"dynamicRegistration": false}, "window": {"showDocument": {"support": false}, "showMessage": {"messageActionItem": {"additionalPropertiesSupport": false}}, "workDoneProgress": true}, "workspace": {"workspaceFolders": true, "workspaceEdit": {"resourceOperations": ["rename", "create", "delete"]}, "applyEdit": true, "symbol": {"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]}, "dynamicRegistration": false, "hierarchicalWorkspaceSymbolSupport": true}, "configuration": true}, "textDocument": {"publishDiagnostics": {"relatedInformation": true, "tagSupport": {"valueSet": [1, 2]}}, "documentSymbol": {"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]}, "dynamicRegistration": false, "hierarchicalDocumentSymbolSupport": true}, "references": {"dynamicRegistration": false}, "documentHighlight": {"dynamicRegistration": false}, "rename": {"prepareSupport": true, "dynamicRegistration": false}, "synchronization": {"dynamicRegistration": false, "willSaveWaitUntil": false, "willSave": false, "didSave": true}, "completion": {"completionItem": {"preselectSupport": false, "commitCharactersSupport": false, "snippetSupport": false, "deprecatedSupport": false, "documentationFormat": ["markdown", "plaintext"]}, "contextSupport": false, "dynamicRegistration": false, "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]}}, "codeAction": {"codeActionLiteralSupport": {"codeActionKind": {"valueSet": ["", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration": false}, "signatureHelp": {"dynamicRegistration": false, "signatureInformation": {"documentationFormat": ["markdown", "plaintext"]}}, "typeDefinition": {"linkSupport": true}, "hover": {"dynamicRegistration": false, "contentFormat": ["markdown", "plaintext"]}, "declaration": {"linkSupport": true}, "implementation": {"linkSupport": true}, "definition": {"linkSupport": true}}}}}Content-Length: 57



{"method": "initialized", "jsonrpc": "2.0", "params": {}}Content-Length: 2037



{"method": "textDocument/didOpen", "jsonrpc": "2.0", "params": {"textDocument": {"uri": "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd", "version": 0, "languageId": "vhdl", "text": "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n"}}}

vhdl-ls.trace.out:

Content-Length: 392



{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{"includeText":true}},"hoverProvider":false,"definitionProvider":true,"referencesProvider":false,"documentHighlightProvider":false,"documentSymbolProvider":true,"codeActionProvider":false,"documentFormattingProvider":false,"documentRangeFormattingProvider":true,"renameProvider":false}}}

lsp.log:

[ START ] 2021-06-30T09:43:47+0200 ] LSP logging initiated
[ INFO ] 2021-06-30T09:43:53+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:311 ]	"Starting RPC client"	{  args = { "--verbose", "--verbose", "--log-file", "vhdl-ls.log", "--trace-file", "vhdl-ls.trace" },  cmd = "ghdl-ls",  extra = {}}
[ DEBUG ] 2021-06-30T09:43:53+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:826 ]	"LSP[ghdl_ls]"	"initialize_params"	{  capabilities = {    callHierarchy = {      dynamicRegistration = false,      <metatable> = <1>{        __tostring = <function 1>      }    },    textDocument = {      codeAction = {        codeActionLiteralSupport = {          codeActionKind = {            valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        dynamicRegistration = false,        <metatable> = <table 1>      },      completion = {        completionItem = {          commitCharactersSupport = false,          deprecatedSupport = false,          documentationFormat = { "markdown", "plaintext" },          preselectSupport = false,          snippetSupport = false,          <metatable> = <table 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 },          <metatable> = <table 1>        },        contextSupport = false,        dynamicRegistration = false,        <metatable> = <table 1>      },      declaration = {        linkSupport = true,        <metatable> = <table 1>      },      definition = {        linkSupport = true,        <metatable> = <table 1>      },      documentHighlight = {        dynamicRegistration = false,        <metatable> = <table 1>      },      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 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      hover = {        contentFormat = { "markdown", "plaintext" },        dynamicRegistration = false,        <metatable> = <table 1>      },      implementation = {        linkSupport = true,        <metatable> = <table 1>      },      publishDiagnostics = {        relatedInformation = true,        tagSupport = {          valueSet = { 1, 2 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      references = {        dynamicRegistration = false,        <metatable> = <table 1>      },      rename = {        dynamicRegistration = false,        prepareSupport = true,        <metatable> = <table 1>      },      signatureHelp = {        dynamicRegistration = false,        signatureInformation = {          documentationFormat = { "markdown", "plaintext" },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      synchronization = {        didSave = true,        dynamicRegistration = false,        willSave = false,        willSaveWaitUntil = false,        <metatable> = <table 1>      },      typeDefinition = {        linkSupport = true,        <metatable> = <table 1>      },      <metatable> = <table 1>    },    window = {      showDocument = {        support = false,        <metatable> = <table 1>      },      showMessage = {        messageActionItem = {          additionalPropertiesSupport = false,          <metatable> = <table 1>        },        <metatable> = <table 1>      },      workDoneProgress = true,      <metatable> = <table 1>    },    workspace = {      applyEdit = true,      configuration = 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 },          <metatable> = <table 1>        },        <metatable> = <table 1>      },      workspaceEdit = {        resourceOperations = { "rename", "create", "delete" },        <metatable> = <table 1>      },      workspaceFolders = true,      <metatable> = <table 1>    }  },  clientInfo = {    name = "Neovim",    version = "0.5.0"  },  initializationOptions = vim.empty_dict(),  processId = 6124,  rootPath = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",  rootUri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test",  trace = "off",  workspaceFolders = { {      name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",      uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"    } }}
[ DEBUG ] 2021-06-30T09:43:53+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  id = 1,  jsonrpc = "2.0",  method = "initialize",  params = {    capabilities = {      callHierarchy = {        dynamicRegistration = false,        <metatable> = <1>{          __tostring = <function 1>        }      },      textDocument = {        codeAction = {          codeActionLiteralSupport = {            codeActionKind = {              valueSet = { "", "Empty", "QuickFix", "Refactor", "RefactorExtract", "RefactorInline", "RefactorRewrite", "Source", "SourceOrganizeImports", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" },              <metatable> = <table 1>            },            <metatable> = <table 1>          },          dynamicRegistration = false,          <metatable> = <table 1>        },        completion = {          completionItem = {            commitCharactersSupport = false,            deprecatedSupport = false,            documentationFormat = { "markdown", "plaintext" },            preselectSupport = false,            snippetSupport = false,            <metatable> = <table 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 },            <metatable> = <table 1>          },          contextSupport = false,          dynamicRegistration = false,          <metatable> = <table 1>        },        declaration = {          linkSupport = true,          <metatable> = <table 1>        },        definition = {          linkSupport = true,          <metatable> = <table 1>        },        documentHighlight = {          dynamicRegistration = false,          <metatable> = <table 1>        },        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 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        hover = {          contentFormat = { "markdown", "plaintext" },          dynamicRegistration = false,          <metatable> = <table 1>        },        implementation = {          linkSupport = true,          <metatable> = <table 1>        },        publishDiagnostics = {          relatedInformation = true,          tagSupport = {            valueSet = { 1, 2 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        references = {          dynamicRegistration = false,          <metatable> = <table 1>        },        rename = {          dynamicRegistration = false,          prepareSupport = true,          <metatable> = <table 1>        },        signatureHelp = {          dynamicRegistration = false,          signatureInformation = {            documentationFormat = { "markdown", "plaintext" },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        synchronization = {          didSave = true,          dynamicRegistration = false,          willSave = false,          willSaveWaitUntil = false,          <metatable> = <table 1>        },        typeDefinition = {          linkSupport = true,          <metatable> = <table 1>        },        <metatable> = <table 1>      },      window = {        showDocument = {          support = false,          <metatable> = <table 1>        },        showMessage = {          messageActionItem = {            additionalPropertiesSupport = false,            <metatable> = <table 1>          },          <metatable> = <table 1>        },        workDoneProgress = true,        <metatable> = <table 1>      },      workspace = {        applyEdit = true,        configuration = 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 },            <metatable> = <table 1>          },          <metatable> = <table 1>        },        workspaceEdit = {          resourceOperations = { "rename", "create", "delete" },          <metatable> = <table 1>        },        workspaceFolders = true,        <metatable> = <table 1>      }    },    clientInfo = {      name = "Neovim",      version = "0.5.0"    },    initializationOptions = vim.empty_dict(),    processId = 6124,    rootPath = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",    rootUri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test",    trace = "off",    workspaceFolders = { {        name = "C:\\Work\\MEGA\\Portable\\GHDL\\bin\\src_test",        uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test"      } }  }}
[ DEBUG ] 2021-06-30T09:43:53+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:491 ]	"decoded"	{  id = 1,  jsonrpc = "2.0",  result = {    capabilities = {      codeActionProvider = false,      definitionProvider = true,      documentFormattingProvider = false,      documentHighlightProvider = false,      documentRangeFormattingProvider = true,      documentSymbolProvider = true,      hoverProvider = false,      referencesProvider = false,      renameProvider = false,      textDocumentSync = {        change = 2,        openClose = true,        save = {          includeText = true        }      }    }  }}
[ DEBUG ] 2021-06-30T09:43:53+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  jsonrpc = "2.0",  method = "initialized",  params = {    [true] = 6  }}
[ DEBUG ] 2021-06-30T09:43:53+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:853 ]	"LSP[ghdl_ls]"	"server_capabilities"	{  codeActionProvider = false,  definitionProvider = true,  documentFormattingProvider = false,  documentHighlightProvider = false,  documentRangeFormattingProvider = true,  documentSymbolProvider = true,  hoverProvider = false,  referencesProvider = false,  renameProvider = false,  textDocumentSync = {    change = 2,    openClose = true,    save = {      includeText = true    }  }}
[ INFO ] 2021-06-30T09:43:53+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:854 ]	"LSP[ghdl_ls]"	"initialized"	{  resolved_capabilities = {    call_hierarchy = false,    code_action = false,    code_lens = false,    code_lens_resolve = false,    completion = false,    declaration = false,    document_formatting = false,    document_highlight = false,    document_range_formatting = true,    document_symbol = true,    execute_command = false,    find_references = false,    goto_definition = true,    hover = false,    implementation = false,    rename = false,    signature_help = false,    signature_help_trigger_characters = {},    text_document_did_change = 2,    text_document_open_close = true,    text_document_save = {      includeText = true    },    text_document_save_include_text = true,    text_document_will_save = false,    text_document_will_save_wait_until = false,    type_definition = false,    workspace_folder_properties = {      changeNotifications = false,      supported = false    },    workspace_symbol = false  }}
[ DEBUG ] 2021-06-30T09:43:53+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:390 ]	"rpc.send.payload"	{  jsonrpc = "2.0",  method = "textDocument/didOpen",  params = {    textDocument = {      languageId = "vhdl",      text = "library ieee;\nuse ieee.std_logic_1164.all;\n\nentity ENTITY_TOP is\n  generic (\n    GEN : integer := 0\n  );\n  port (\n    INP : in std_logic\n  );\nend entity;\n\narchitecture arch of ENTITY_TOP is\n  signal sig : std_logic := '0';\n  \n  component ENTITY_1\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \n  component ENTITY_2\n    generic (\n      GEN : integer := 0\n    );\n    port (\n      INP : in std_logic\n    );\n  end component;\n  \nbegin\n\n  ENTITY_1_1 : entity work.ENTITY_1(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_1_2 : entity work.ENTITY_1(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_1 : entity work.ENTITY_2(arch1)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  ENTITY_2_2 : entity work.ENTITY_2(arch2)\n  generic map(\n    GEN => GEN\n  )\n  port map(\n    INP => INP\n  );\n  \n  PROC_p: process(INP)\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\n  \n  process\n  -----------------------------\n  variable var_v : integer := 0;\n  -----------------------------\n  begin\n      -----------------------------\n      var_v := 0;\n      -----------------------------\n      if (INP = '1') then\n        sig <= '1';\n      else\n        sig <= '0';\n      end if;\n      -----------------------------\n  end process;\n  -----------------------------\nend architecture;\n",      uri = "file:///C:/Work/MEGA/Portable/GHDL/bin/src_test/ENTITY_TOP.vhd",      version = 0    }  }}
[ ERROR ] 2021-06-30T09:43:53+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:457 ]	"rpc"	"ghdl-ls"	"stderr"	"\nraised S"
[ ERROR ] 2021-06-30T09:43:53+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:457 ]	"rpc"	"ghdl-ls"	"stderr"	"YSTEM.ASSERTIONS.ASSERT_FAILURE : files_map.adb:608\n"
[ INFO ] 2021-06-30T09:43:57+0200 ] ...\MEGA\Portable\Neovim\share\nvim\runtime\lua\vim\lsp.lua:1213 ]	"exit_handler"	{}

In the log file above, this line is reported:

[ ERROR ] 2021-06-30T09:43:53+0200 ] ...A\Portable\Neovim\share\nvim\runtime\lua\vim\lsp\rpc.lua:457 ]	"rpc"	"ghdl-ls"	"stderr"	"YSTEM.ASSERTIONS.ASSERT_FAILURE : files_map.adb:608\n"

This time GHDL-LS crashed, maybe path management could be involved in this.

Summary:

When opening ENTITY_TOP.vhd, this happens:

  • Setup A: no GHDL-LS crash, but files are not currently identified as belonging to the project.
  • Setup B: GHDL-LS crashes.

Also, in Setup B, if a file not listed in hdl-prj.json file is opened, GHDL-LS correctly reports it as not belonging to the project files, but if a file listed in hdl-prj.json is opened instead, then it crashes as described.

Finally, there seems to be a bug about vhdl-ls.trace.in.XXX and vhdl-ls.trace.out.XXX file generation (output file writer set XXX to 5 as a maximum, then GHDL-LS crashes).

@tgingold
Copy link
Member

tgingold commented Jul 3, 2021

I have tried to install neovim on my windows VM. Big failure: I cannot install nvim-lspconfig plugin.
I think vim-plug is installed, but it simply doesn't work. As far as I understand, it is supposed to use git, but I am not sure how git is invoked (and not even sure how git should be installed)...

@tgingold
Copy link
Member

tgingold commented Jul 3, 2021

I am making some progresses.

@pidgeon777
Copy link
Author

I would suggest making use of this config:

https://github.com/ChristianChiarulli/LunarVim

It already provides many useful plugins, and also it simplifies the process of enabling GHDL-LS in Neovim.

I can provide support if needed.

@pidgeon777
Copy link
Author

I also add that Neovim 0.5 stable has just been released after 3 years of development, 0.4.4 is now its previous version.

@tgingold
Copy link
Member

tgingold commented Jul 4, 2021

I was not able to reproduce the issue, but I am using the python from mingw. From the log, I would assume you are using a full windows python. Is that correct ?

@Paebbels
Copy link
Member

Paebbels commented Jul 4, 2021

@tgingold with latest change how pyGHDL sets the DLL search path for Python 3.8/3.9, you should be able to run also ghdl-ls from Windows CPython. You can call the libghdl...dll within MinGW64 by using GHDL_PREFIX.

@tgingold
Copy link
Member

tgingold commented Jul 4, 2021 via email

@pidgeon777
Copy link
Author

pidgeon777 commented Jul 5, 2021

For installing GHDL-LS, I followed those advices:

#73 (comment)

I was not able to reproduce the issue, but I am using the python from mingw. From the log, I would assume you are using a full windows python. Is that correct ?

I can confirm that this is the command used to launch GHDL-LS in Neovim:

C:\msys64\mingw64\bin\ghdl-ls.exe --verbose --verbose --log-file vhdl-ls.log --trace-file vhdl-ls.trace

This command, in turn, launches:

C:\msys64\mingw64\bin\python.exe "C:\msys64\mingw64\bin\ghdl-ls-script.py" "--verbose" "--verbose" "--log-file" "vhdl-ls.log" "--trace-file" "vhdl-ls.trace"

@tgingold
Copy link
Member

tgingold commented Jul 6, 2021

Ok, I can reproduce a crash.

@tgingold
Copy link
Member

tgingold commented Jul 6, 2021

There is a consistency issue with the colon in uri like 'file:///C:/xxx'
It can be encoded as '%3A'

@tgingold
Copy link
Member

tgingold commented Jul 6, 2021

On my setup, my last commit fixes the issue. Now, does it work on your setup ?

@pidgeon777
Copy link
Author

I have two questions, these are the commands I executed for installing GHDL-LS into Windows.

In MSYS2 shell:

$ pacman -Syu

$ pacman -S mingw-w64-x86_64-ghdl-llvm
$ pacman -S mingw-w64-x86_64-python-pip

$ pacman -S git

In MinGW64 shell:

pip install git+https://github.com/ghdl/ghdl.git

I would like to ask:

  1. What procedure did you follow to install GHDL-LS in Windows on your setup?
  2. How could I update my local installation so that I can try your new version?

Thank you

@Paebbels
Copy link
Member

Paebbels commented Jul 6, 2021

file:///C:/ is not a valid URL for (local) resources.

The format is <protocol>://<host/<path>. For Windows, a C: drive translates to /c/, because <host> is usually not used, hence the 3 forward slashes in a URL for paths compare to 2 slashes in e.g. https://.

@tgingold
Copy link
Member

tgingold commented Jul 6, 2021

@umarcor should know how to get the latest binaries (and if this is possible).

You can also simply do a new pip install on the git repo. The binaries haven't changed.

For my setup, I always have a cloned repo and I build locally.

@tgingold
Copy link
Member

tgingold commented Jul 6, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants