Replies: 2 comments 2 replies
-
I really appreciate your thoughts about this space and making life easier for us, but I also would like to point out that adding new features to the language means that we're going to need to support two code paths for the foreseeable future. I'd like the project to have a good amount of backwards compatibility, and I wonder if there would be a way to maintain that, even with new features. I'll shoot you an email. Thanks for the interest. |
Beta Was this translation helpful? Give feedback.
-
We're doing something kind of ugly, we kick off a complation attempt and catch exceptions during formatting. Kicking off a file compilation means that errors go through our normal processes. |
Beta Was this translation helpful? Give feedback.
-
@scohen, awesome job on the Thinking Elixir podcast interview (and to you as well @scottming).
If you don't mind, I have some follow up questions:
You mention UTF-16 encoding and that you work with diffs. I assume that this will be a problem once we implement Environments for code fragments/buffers (i.e. elixirsense) elixir-lang/elixir#12645? If you want to pass just a diff to Elixir, would you be able to compute the UTF-8 range of the diff and pass it forward? Or you can't do translate a UTF-16 range to UTF-8 without having the whole contents or at least the whole line? My gut says it is not possible but maybe it is hard to say upfront.
About namespacing, do you namespace the user code or Lexical code? Because I am not sure if I understand the need for namespacing. As you said, there are two Erlang VMs running: one for the language server and another that interacts with the user code (btw, I agree this is the right design). The language server is isolated and therefore it doesn't need namespacing. The runtime will interface with user code but because it communicates with the language server via Erlang distribution, there is less need for dependencies like Jason?
About dialyzer, honestly, I would not focus too much on it. If you have to, then focus on the new incremental mode in Erlang/OTP 26 which is much faster and will become the default in the future anyway.
What about compilation? Is my understanding correct that you currently do not compile the user project. Keep in mind that indeed there may be dragons here, especially because different compilations (LS compilation, Phoenix endpoint plug compilation, CLI compilation) may race each other and currently there is no locking (we are trying to get that into Erlang/OTP). The other thing is that some warnings will only happen once you compile as a project (Elixir compiler has two passes, a single file pass and a group pass that sees the whole project). Luckily, Mix compilers store all warnings, so if you decide to not compile yourself, we can add an API for you to retrieve the compilation warnings (without compiling).
Btw, Steve, do you mind shooting me a quick email? You can find it in my GH profile. :) And yes, I think all of you LS maintainers should have a convo on how to help each other. Thank you for the time!
Beta Was this translation helpful? Give feedback.
All reactions