vscode-ruby version: 0.25.2useLanguageServer is true?): yesSince the extension version 0.25.1, the language server is crashing when trying to use rubocop as the ruby linter via these settings:
"ruby.lint": {
"rubocop": {
"useBundler": true
}
}
I am not positive on this but it seems to be related to the newly introduced use of WASM with tree-sitter.
I am running the plugin on Debian 9 stretch via the Remote - Containers extension version 0.67.3. Host is macOS 10.14.6.
The linter works without crashing. It currently works with extension version <= 0.24.2. The language server works on 0.25.2 when rubocop linting is disabled.
Output as follows:
[Info - 7:27:39 PM] Initializing Ruby language server...
Loading Ruby tree-sitter syntax from /root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/tree-sitter-ruby.wasm
Lint: executing bundle exec rubocop -s /app/app/lib/oracle/request.rb -f json...
/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(0),i=n(25),o=n(57),s=n(5),u=n(41),a=n(14),c=n(35),l=function(t){function e(n,r,i){var s=t.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=o.a;break;case 1:if(!n){s.destination=o.a;break}if("object"==typeof n){n instanceof e?(s.syncErrorThrowable=n.syncErrorThrowable,s.destination=n,n.add(s)):(s.syncErrorThrowable=!0,s.destination=new f(s,n));break}default:s.syncErrorThrowable=!0,s.destination=new f(s,n,r,i)}return s}return r.a(e,t),e.prototype[u.a]=function(){retu
TypeError: e.flat is not a function
at e.o.forkJoin.pipe.s.map.e [as project] (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:285305)
at e._next (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:10562)
at e.next (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:1083)
at Object.complete (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:53109)
at Object.n (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:2949)
at e.__tryOrUnsub (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:3191)
at e.complete (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:3084)
at e._complete (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:1548)
at e.complete (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:1247)
at e._complete (/root/.vscode-server/extensions/rebornix.ruby-0.25.2/dist/server/index.js:16:1548)
[Info - 7:27:41 PM] Connection to server got closed. Server will restart.
This occurs until the language server reaches max retries with the final message:
[Error - 7:27:43 PM] Connection to server got closed. Server will not be restarted.
Ya, that's a bug. That's not directly related to the WASM change but I used Array.flat(). TS should have compiled that out but apparently not. I'll push a bugfix tonight.
Awesome! Thanks!
Most helpful comment
Ya, that's a bug. That's not directly related to the WASM change but I used
Array.flat(). TS should have compiled that out but apparently not. I'll push a bugfix tonight.