Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Isolate loading and deployment of plugins #3965

Closed
akosyakov opened this issue Jan 8, 2019 · 1 comment · Fixed by #4049
Closed

Isolate loading and deployment of plugins #3965

akosyakov opened this issue Jan 8, 2019 · 1 comment · Fixed by #4049
Assignees
Labels
bug bugs found in the application plug-in system issues related to the plug-in system

Comments

@akosyakov
Copy link
Member

I'm trying to bundle builtin VS Code extensions: #3956 (comment)

Some of the extensions are mispackaged, or there are bugs in our code to parse manifest of certain extensions. Whenever the plugin system stumbles at such extension it throws and interrupts processing of consequent extensions.

Some call stacks which I get:

root ERROR Uncaught Exception:  SyntaxError: Unexpected token P in JSON at position 28873
root ERROR SyntaxError: Unexpected token P in JSON at position 28873
    at JSON.parse (<anonymous>)
    at HostedPluginReader.getPluginMetadata (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/hosted/node/plugin-reader.js:71:27)
    at /workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/hosted/node/plugin-service.js:119:47
    at Array.forEach (<anonymous>)
    at HostedPluginServerImpl.deployBackendPlugins (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/hosted/node/plugin-service.js:118:24)
    at PluginDeployerImpl.<anonymous> (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/main/node/plugin-deployer-impl.js:192:41)
    at step (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/main/node/plugin-deployer-impl.js:56:23)
    at Object.next (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/main/node/plugin-deployer-impl.js:37:53)
    at /workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/main/node/plugin-deployer-impl.js:31:71
    at new Promise (<anonymous>)
root ERROR [hosted-plugin: 9591] { Error: Cannot find module '/tmp/vscode-unpacked/configuration-editing-1.0.0.vsix/extension/out/extension'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Function.module._load (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-init.js:94:33)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.loadPlugin (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/hosted/node/plugin-host-rpc.js:68:28)
    at PluginManagerExtImpl.$init (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/plugin/plugin-manager.js:123:44)
    at RPCProtocolImpl.doInvokeHandler (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/api/rpc-protocol.js:173:23)
    at RPCProtocolImpl.invokeHandler (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/api/rpc-protocol.js:158:41)
    at RPCProtocolImpl.receiveRequest (/workspace/vscode-builtin-extensions/node_modules/@theia/plugin-ext/lib/api/rpc-protocol.js:122:45) code: 'MODULE_NOT_FOUND' }

I'm going to look into fixing packaging of VS Code extensions and individual parsing issues. Someone else can look into adding try - catch at cases where we loop over plugins.

@akosyakov akosyakov added bug bugs found in the application plug-in system issues related to the plug-in system labels Jan 8, 2019
@akosyakov akosyakov self-assigned this Jan 13, 2019
@akosyakov
Copy link
Member Author

akosyakov commented Jan 14, 2019

Plugin which cannot be loaded is emmet. nls file has new line delimiters in values which are not get escaped during localization and lead to a bogus JSON. I would align localization with VS Code approach, i.e. instead of replacing variables in text, replace values in parsed JSON object, and add necessary code to isolate extension deployment.

akosyakov added a commit that referenced this issue Jan 14, 2019
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Jan 14, 2019
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Jan 15, 2019
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Jan 16, 2019
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Jan 16, 2019
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Jan 17, 2019
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
akosyakov added a commit that referenced this issue Jan 17, 2019
Signed-off-by: Anton Kosyakov <anton.kosyakov@typefox.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application plug-in system issues related to the plug-in system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant