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

Lsp server #9

Open
leiserfg opened this issue Sep 14, 2023 · 3 comments
Open

Lsp server #9

leiserfg opened this issue Sep 14, 2023 · 3 comments

Comments

@leiserfg
Copy link

Is there any, or at least a hope?

@minoki
Copy link
Owner

minoki commented Sep 14, 2023

Although I haven't tried it myself, there is millet.

There is a possibility that I choose to create my own language server, but the priority is currently low.

@fabjan
Copy link

fabjan commented Jan 2, 2024

Millet works fine for LunarML, given they can both use mlb files to figure out what files to use.

I have been playing around with LunarML and the LÖVE game engine for fun, but I eventually decided to turn the LSP off because I have not figured out how to make Millet understand the extra libraries LunarML comes with (for example the Lua structure). If anyone has the time or interest to see if I'm doing something wrong I made a small repository here where I reproduce the problem trying to combine Millet and LunarML: https://github.com/fabjan/shiny-octo-spork, the REAME tries to explain the situation and what I have tried.

I'm am not a professional SML developer, and don't have much of a clue how to glue files together for building and to make Millet understand, I have been following examples and made things work with trial and error. Maybe I'm just making some silly mistake there, or maybe they just cannot be easily integrated.

@fabjan
Copy link

fabjan commented Jan 6, 2024

Update on the comment above.

I had two problems:

  1. LunarML and Millet both come with their different SML basis definitions
  2. The LUA signature I extracted from the Lua basis in LunarML was not compatible with the Lua structure implementation I got when passing the --luajit option to the LunarML compiler.

One was solved by ensuring the MLB file used for Millet as the workspace root does not actually use the LunarML basis. I moved the $(SML_LIB)/basis/lua.mlb dependency out to a new MLB I called main.mlb and only use for building with LunarML.

Two was solved by iterating failing builds and commenting out the signature fields that were missing when building with --luajit

YMMV depending on what you want to build. I used --luajit because without any flags the code emitted used // which is not available in the version of Lua that comes with the LÖVE version I used. I believe my shiny-onto-spork repository linked above can use used as a reference for getting Millet working. And if someone who unlike me is a real Standard ML developer they can probably figure out how to simplify 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

3 participants