rails icon indicating copy to clipboard operation
rails copied to clipboard

Uncaught Exception Errors

Open mzagaja opened this issue 2 years ago • 2 comments

I am getting the following errors in my console, their source unclear:

Extension encountered an uncaught exception:
/Users/mzagaja/Library/Application Support/Nova/Extensions/com.tommasonegri.Rails/Scripts/main.js (Line 38, Column 36)
TypeError: undefined is not an object (evaluating 'nova.workspace.activeTextEditor.onDidSave')
    @file:///Users/mzagaja/Library/Application%20Support/Nova/Extensions/com.tommasonegri.Rails/Scripts/main.js:38:36
Extension encountered an uncaught exception:
/Users/mzagaja/Library/Application Support/Nova/Extensions/com.tommasonegri.Rails/Scripts/helpers.js (Line 134, Column 28)
TypeError: null is not an object (evaluating 'noteParts[1]')
    @file:///Users/mzagaja/Library/Application%20Support/Nova/Extensions/com.tommasonegri.Rails/Scripts/helpers.js:134:28
    forEach@[native code]
    @file:///Users/mzagaja/Library/Application%20Support/Nova/Extensions/com.tommasonegri.Rails/Scripts/helpers.js:120:22
    @[native code]
    promiseReactionJob@[native code]
Solargraph Language Server connection closed unexpectedly: Error Domain=NSCocoaErrorDomain Code=4 "The file “stdio” doesn’t exist." UserInfo={NSFilePath=/stdio}

^ odd beause I'm pretty sure I'm using socket.

mzagaja avatar Dec 21 '22 21:12 mzagaja

Hi there! Thanks for reporting this.

It seems the same issue reported in #27. #28 should fix it.

However, since I'm planning to remove Solargraph and Rubocop from this extension in favor of a standalone and completely rewritten new one (which integrates the fix), I think I won't merge it for now. The new extension should be ready for a first release tomorrow or the day after, so I hope you can wait a little bit 🙏.

By the way, the new extension should be way more stable, capable of using the global or bundled Solargraph gem and improve the experience with new features like workspace symbols, symbol renaming and find references.

CleanShot 2022-12-21 at 23 25 50@2x

It also avoids the previous workaround for launching Rubocop format and format on save. This means you can now configure the formatter from .solargraph.yml and expect that the extension uses it.

formatter:
  rubocop:
    cops: safe
    except: []
    only: []
    extra_args: []

tommasongr avatar Dec 21 '22 22:12 tommasongr

Hi there! Here it is my little Christmas present: https://github.com/nova-ruby/solargraph

If you want to start using the new Solargraph extension make sure to disable it from the Ruby on Rails extension

CleanShot 2022-12-24 at 10 39 35@2x

tommasongr avatar Dec 24 '22 09:12 tommasongr