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

[RFC] What would it take to not use Ruby for the Language Server? #304

Open
glennsarti opened this issue Apr 21, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@glennsarti
Copy link
Contributor

glennsarti commented Apr 21, 2021

Out of Scope

Debug Server - The debug server requires compilation which HAS to have a ruby runtime.

In Scope

  • As far as I know there are only two languages which support a lexer/parser for the Puppet Language: Ruby (of course!) and Golang via Lyra
  • Golang does have a Language Server Protocol module so there wouldn't be a need to create our own server and protocol.
  • Golang compiles to a small binary on many platforms

Therefore Golang would be considered an alternate language for the Puppet Editor Services

Feature All in Go Needs information from Ruby Hosted entirely in Ruby Notes
Code Folding Just needs the Puppet Lexer
Diagnostics Needs puppet-lint. There's nothing comparable in Go
Diagnostics The puppetfile-resolver is in Ruby. But it could be done in Go. Except the puppetfile is actually ruby code
Hover The parser is needed to locate the cursor in the document (which could be Go) however the actual information comes from the Sidecar, which requires YARD and Puppet Strings, which requires Ruby. But it is out-of-process/async-able
Autocomplete See Hover comments
Definition See Hover comments
Document Symbol Requires parser
Format on Type Currently it uses the Puppet Lint lexer which is Ruby only. But it could be changed to use the Puppet lexer based on the code folding
Signature Provider See Hover comments
Puppet - Resource Requires Puppet providers (Ruby) therefore can't be in Go
Puppet - Get Facts Facter (2/4) is in Ruby
Puppet - Node Graph Requires compilation therefore can't be in Go
Workspace Symbol See Hover comments

'

@glennsarti glennsarti added the enhancement New feature or request label Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant