jaredly / jaredly/reason-language-server

Running the contributed command: 'reason-language-server.restart' failed.

Open
#433 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
OCaml
Stars
649
Forks
85
PR merge metrics
No merged PRs in 30d

Description

I have a problem when trying to restart reason language server. When it's active and I run the command `reason-language-server.restart` it fails but when I run it again it successfully starts the language server.

In `Log (Extension Host)` I have the following error when it fails:
![image](https://user-images.githubusercontent.com/10157660/77817667-d0b7a100-70dd-11ea-961a-23f9d190bbc5.png)
```
[2020-03-28 10:17:01.828] [exthost] [error] Error: EBUSY: resource busy or locked, open 'c:\Users\lesha\.vscode\extensions\jaredly.reason-vscode-1.7.8\bin.native.exe.hot.exe'
at Object.openSync (fs.js:447:3)
at Object.func (electron/js2c/asar.js:140:31)
at Object.func [as openSync] (electron/js2c/asar.js:140:31)
at Object.writeFileSync (fs.js:1206:35)
at restart (c:\Users\lesha\.vscode\extensions\jaredly.reason-vscode-1.7.8\src\index.js:144:16)
at _executeContributedCommand (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:549:220)
at _.$executeContributedCommand (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:549:595)
at p._doInvokeHandler (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:688:464)
at p._invokeHandler (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:688:156)
at p._receiveRequest (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:686:817)
at p._receiveOneMessage (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:685:623)
at c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:683:791
at l.fire (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:845)
at v.fire (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:191:325)
at c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:851:104
at l.fire (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:845)
at v.fire (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:191:325)
at t.PersistentProtocol._receiveMessage (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:195:717)
at c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:192:897
at l.fire (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:48:845)
at p.acceptChunk (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:188:897)
at c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:188:249
at Socket.t (c:\Users\lesha\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:197:232)
at Socket.emit (events.js:203:13)
at addChunk (_stream_readable.js:295:12)
at readableAddChunk (_stream_readable.js:276:11)
at Socket.Readable.push (_stream_readable.js:210:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:166:17) reason-language-server.restart
```

I'm not sure if it's something happens only on my PC or it's a general issue on Windows.

**System information:**
- OS: Windows 10 1909
- node: v12.7.0
- npm: v6.10.0
- bsb: v7.2.2
- VSCode: v1.43.2

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/index.js at the restart function around line 144 and inspect the write that reports EBUSY for bin.native.exe.hot.exe. Reproduce the contributed command on Windows, then verify that the first restart succeeds and the language server starts normally without requiring a second command.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.