Plug-in broke suddenly?
ChristopherDrum opened this issue · 6 comments
To my knowledge, I've done nothing to my VSCode setup except perhaps a VSCode update to version 1.66.0
The plugin now generates dozens... hundreds?... uncountably many error messages where the log starts as
PICO-8 Language Server starting.
PICO-8 Language Server launched.
c:\Users\micro\.vscode\extensions\pollywoggames.pico8-ls-0.3.2\server\out-min\main.js:33
`&&s++}a&&f.length>0&&d.push(f.length),this._lineOffsets=d}return this._lineOffsets},o.prototype.positionAt=function(d){d=Math.max(Math.min(d,this._content.length),0);var f=this.getLineOffsets(),a=0,s=f.length;if(s===0)return r.create(0,d);for(;a<s;){var p=Math.floor((a+s)/2);f[p]>d?s=p:a=p+1}var y=a-1;return r.create(y,d-f[y])},o.prototype.offsetAt=function(d){var f=this.getLineOffsets();if(d.line>=f.length)return this._content.length;if(d.line<0)return 0;var a=f[d.line],s=d.line+1<f.length?f[d.line+1]:this._content.length;return Math.max(Math.min(a+d.character,s),a)},Object.defineProperty(o.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),o}(),l;(function(o){var d=Object.prototype.toString;function f(B){return typeof B!="undefined"}o.defined=f;function a(B){return typeof B=="undefined"}o.undefined=a;function s(B){return B===!0||B===!1}o.boolean=s;function p(B){return d.call(B)==="[object String]"}o.string=p;function y(B){return d.call(B)==="[object Number]"}o.number=y;function _(B,mt,sn){return d.call(B)==="[object Number]"&&mt<=B&&B<=sn}o.numberRange=_;function N(B){return d.call(B)==="[object Number]"&&-2147483648<=B&&B<=2147483647}o.integer=N;function M(B){return d.call(B)==="[object Number]"&&0<=B&&B<=2147483647}o.uinteger=M;function X(B){return d.call(B)==="[object Function]"}o.func=X;function re(B){return B!==null&&typeof B=="object"}o.objectLiteral=re;function se(B,mt){return Array.isArray(B)&&B.every(mt)}o.typedArray=se})(l||(l={}))})});var ae=D(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.ProtocolNotificationType=xe.ProtocolNotificationType0=xe.ProtocolRequestType=xe.ProtocolRequestType0=xe.RegistrationType=void 0;var kt=Tt(),_s=class{constructor(e){this.method=e}};xe.RegistrationType=_s;var Cs=class extends kt.RequestType0{constructor(e){super(e)}};xe.ProtocolRequestType0=Cs;var Es=class extends kt.RequestType{constructor(e){super(e,kt.ParameterStructures.byName)}};xe.ProtocolRequestType=Es;var Ds=class extends kt.NotificationType0{constructor(e){super(e)}};xe.ProtocolNotificationType0=Ds;var Ps=class extends kt.NotificationType{constructor(e){super(e,kt.ParameterStructures.byName)}};xe.ProtocolNotificationType=Ps});var Ls=D(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.objectLiteral=ie.typedArray=ie.stringArray=ie.array=ie.func=ie.error=ie.number=ie.string=ie.boolean=void 0;function Tc(t){return t===!0||t===!1}ie.boolean=Tc;function Ns(t){return typeof t=="string"||t instanceof String}ie.string=Ns;function kc(t){return typeof t=="number"||t instanceof Number}ie.number=kc;function wc(t){return t instanceof Error}ie.error=wc;function Rc(t){return typeof t=="function"}ie.func=Rc;function qs(t){return Array.isArray(t)}ie.array=qs;function _c(t){return qs(t)&&t.every(e=>Ns(e))}ie.stringArray=_c;function Cc(t,e){return Array.isArray(t)&&t.every(e)}ie.typedArray=Cc;function Ec(t){return t!==null&&typeof t=="object"}ie.objectLiteral=Ec});var Fs=D(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.ImplementationRequest=void 0;var Dc=ae(),Pc;(function(t){t.method="textDocument/implementation",t.type=new Dc.ProtocolRequestType(t.method)})(Pc=jt.ImplementationRequest||(jt.ImplementationRequest={}))});var Is=D(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.TypeDefinitionRequest=void 0;var Nc=ae(),qc;(function(t){t.method="textDocument/typeDefinition",t.type=new Nc.ProtocolRequestType(t.method)})(qc=Wt.TypeDefinitionRequest||(Wt.TypeDefinitionRequest={}))});var As=D(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.DidChangeWorkspaceFoldersNotification=Ue.WorkspaceFoldersRequest=void 0;var Os=ae(),Lc;(function(t){t.type=new Os.ProtocolRequestType0("workspace/workspaceFolders")})(Lc=Ue.WorkspaceFoldersRequest||(Ue.WorkspaceFoldersRequest={}));var Fc;(function(t){t.type=new Os.ProtocolNotificationType("workspace/didChangeWorkspaceFolders")})(Fc=Ue.DidChangeWorkspaceFoldersNotification||(Ue.DidChangeWorkspaceFoldersNotification={}))});var Ms=D(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});Bt.ConfigurationRequest=void 0;var Ic=ae(),Oc;(function(t){t.type=new Ic.ProtocolRequestType("workspace/configuration")})(Oc=Bt.ConfigurationRequest||(Bt.ConfigurationRequest={}))});var Ws=D(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.ColorPresentationRequest=He.DocumentColorRequest=void 0;var js=ae(),Ac;(function
and I'll cut it off there, because it goes on like this forever. And it kind of makes the plugin unusable, because I can't use the terminal portion of VSCode as it is doing nothing but generating error messages. Turning off the terminal results in the terminal auto-opening to show me more errors, with the error message constantly flashing in the bottom of the screen.
Hm. I released an update to the extension a couple days ago, so it likely had something to do with that. I’ll look into this later today.
I'm unable to reproduce this, on either Mac or Windows, with the latest pico8-ls and VSCode 1.66.0. Can you provide details on what system you're running this, and what code you try to view when this happens?
- Is it any cart in particular, or all carts?
- Does it help to uninstall & reinstall the plugin?
- Does it help to uninstall & reinstall VSCode?
I have been able to reproduce this trivially. It appears to be related to string decoration characters.
If I have a fresh, blank cart and add just one line
print('\^ithis fails')
This will trigger the cascading failure I see.
That \^
combo seems to be the trigger. As soon as I type the ^
the plugin goes haywire.
Just for completeness sake:
I reproduced on both Windows 10 and macOS 12.3.
On Windows I uninstalled and reinstalled the plugin.
On macOS I installed the plugin fresh for the first time.
I have not done anything as drastic as reinstalling VSCode, but I think it isn't necessary given my findings above.
Thanks, yes, that reproduces it for me too! This should be a pretty quick fix -- I'll take a look later today.
Should be fixed with 0.3.3 (just released). Feel free to re-open if it's not fixed.