puppetlabs / puppetlabs/puppet-editor-services
[RFC] What would it take to not use Ruby for the Language Server?
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Ruby
- Stars
- 52
- Forks
- 21
- Avg merge
- 15h
- Merged PRs (30d)
- 3
Description
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 |
'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by reviewing the feature table and the Ruby and Go parser, language-server, diagnostics, resolver, and Puppet integration dependencies it identifies. Done would require a scoped, agreed design for which components can move to Go and which must remain in Ruby.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, ruby
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100