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

[next] textDocument/hover fails in tl.tl #20

Closed
pdesaulniers opened this issue Sep 20, 2024 · 2 comments
Closed

[next] textDocument/hover fails in tl.tl #20

pdesaulniers opened this issue Sep 20, 2024 · 2 comments

Comments

@pdesaulniers
Copy link
Member

pdesaulniers commented Sep 20, 2024

To reproduce:

  1. Install tl from the next branch and lua-language-server from the tl-next branch
  2. Add a tlconfig.lua file in https://github.com/teal-language/tl/tree/next (see Make tlconfig.lua optional? #19)
  3. Run the language server in tl's source tree (next branch)
  4. Hover pretty much any symbol with the mouse
{
    "message": "Error in handler for request with method {0}: {1}",
    "level": "ERROR",
    "module": "lsp_events_manager",
    "timestamp": 1726792888,
    "fields": {
        "1": "/home/patrick/.luarocks/share/lua/5.4/tl.lua:13399: attempt to index a nil value (field 'reporter')\nstack traceback:\n\t/home/patrick/.luarocks/share/lua/5.4/tl.lua:13399: in function 'tl.get_types'\n\t...luarocks/share/lua/5.4/teal_language_server/document.lua:158: in function 'teal_language_server.document.get_type_report'\n\t...luarocks/share/lua/5.4/teal_language_server/document.lua:427: in function 'teal_language_server.document.type_information_at'\n\t...cks/share/lua/5.4/teal_language_server/misc_handlers.lua:286: in function 'teal_language_server.misc_handlers._on_hover'\n\t...cks/share/lua/5.4/teal_language_server/misc_handlers.lua:317: in field '?'\n\t...hare/lua/5.4/teal_language_server/lsp_events_manager.lua:41: in function <...hare/lua/5.4/teal_language_server/lsp_events_manager.lua:41>\n\t[C]: in function 'xpcall'\n\t...hare/lua/5.4/teal_language_server/lsp_events_manager.lua:40: in function 'teal_language_server.lsp_events_manager._trigger'\n\t...hare/lua/5.4/teal_language_server/lsp_events_manager.lua:78: in function <...hare/lua/5.4/teal_language_server/lsp_events_manager.lua:69>",
        "0": "textDocument/hover"
    },
    "time": 19.485117641998
}
@pdesaulniers pdesaulniers changed the title [next] Error while parsing tl.tl [next] textDocument/hover fails in tl.tl Sep 20, 2024
@pdesaulniers pdesaulniers changed the title [next] textDocument/hover fails in tl.tl [next] textDocument/hover fails in tl.tl Sep 20, 2024
@pdesaulniers
Copy link
Member Author

pdesaulniers commented Sep 20, 2024

Sorry, I opened this issue too fast! It seems like the tl-check branch doesn't typecheck yet :)

@svermeulen
Copy link
Collaborator

At least one of the issues was that the lua wasn't generated yet for TLS in tl-next branch. I've generated it now, but it still may not work yet since I haven't tested it

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

2 participants