microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.64k stars 28.67k forks source link

onDidOpenNotebookDocument fires for open notebook #99233

Closed jrieken closed 4 years ago

jrieken commented 4 years ago
mainThreadExtensionService.js:45 Error: Project for 'file:///Users/jrieken/Code/_samples/devfest/foo/test.github-issues' already EXISTS. All projects: file:///Users/jrieken/Code/_samples/devfest/foo/test.github-issues
    at ProjectContainer.register (/Users/jrieken/Code/vscode-github-issue-notebooks/dist/extension.js:222)
    at /Users/jrieken/Code/vscode-github-issue-notebooks/dist/extension.js:1067
    at Emitter.fire (VM189 event.js:457)
    at /Users/jrieken/Code/vscode/out/vs/workbench/api/common/extHostNotebook.js:877
    at Array.forEach (<anonymous>)
    at ExtHostNotebookController.$acceptDocumentAndEditorsDelta (/Users/jrieken/Code/vscode/out/vs/workbench/api/common/extHostNotebook.js:837)
    at RPCProtocol._doInvokeHandler (rpcProtocol.js:336)
    at RPCProtocol._invokeHandler (rpcProtocol.js:321)
    at RPCProtocol._receiveRequest (rpcProtocol.js:248)
    at RPCProtocol._receiveOneMessage (rpcProtocol.js:176)
    at rpcProtocol.js:66
    at Emitter.fire (VM189 event.js:457)
jrieken commented 4 years ago

this might something else...

jrieken commented 4 years ago

Yeah, this was bad adoption of the change event which would overwrite disposables whenever a new notebook came along and consequently it would never cleanup

JacksonKearl commented 4 years ago

Running into lots of issues verifying this. For one, closing the notebook B via the tab button also clears notebook A am I'm left with a blank editor.

connor4312 commented 4 years ago

I was able to verify on my machine