Shopify / Shopify/ruby-lsp-rails

When the rails addon crashes on startup there's no indication of where the error happened

Open
#650 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
688
Forks
44
PR merge metrics
No merged PRs in 30d

Description

If the rails addon crashes on startup, there's no indication of where the problem is. There's the long logs in the "Output" tab, but you'd have to know to look there, and they can be rather large especially with the long backtraces common with rails applications.

I coded up a simple POC to parse the exception text for a meaningful message, and last source location under the workspace, and send a Diagnostic: #649 so that the problem is revealed in the "Problems" tab under the editor. It's not necessarily pretty, and might not handle all situations where there's a runtime error, and it doesn't seem like it'll result in the rails addon being retried once it fails once (even if the source of the problem is fixed). But, it might provide a good jumping off point for someone more familiar with this project to take on.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the diagnostic POC described in issue #649 and the Rails add-on's startup error path. Compare the exception text and workspace source-location handling with the existing Output logs. Done means startup failures expose a useful message and source location in the editor's Problems tab.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.