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

Python plugin fails to activate (2022.16.1) #12352

Closed
kenneth-marut-work opened this issue Mar 27, 2023 · 2 comments · Fixed by #12482
Closed

Python plugin fails to activate (2022.16.1) #12352

kenneth-marut-work opened this issue Mar 27, 2023 · 2 comments · Fixed by #12482
Assignees
Labels
plug-in system issues related to the plug-in system python issues related to the python language / extension

Comments

@kenneth-marut-work
Copy link
Contributor

kenneth-marut-work commented Mar 27, 2023

Bug Description:

On Theia master, after installing the latest python plugin available (2022.16.1) and opening a .py file, this toast message appears:

image

In the developer tools console, I see an earlier error that appears to be related:

image

May be related to #12323

Steps to Reproduce:

  1. Start Theia master (I also had the default plugins installed)
  2. Open the extensions view and install the latest ms-python plugin
  3. Open a python file, or just switch to the python language mode
  4. See the toast message

Additional Information

  • Operating System:
    Linux
  • Theia Version:
    Master
@kenneth-marut-work kenneth-marut-work added plug-in system issues related to the plug-in system python issues related to the python language / extension labels Mar 27, 2023
@colin-grant-work
Copy link
Contributor

Another note in this context is that our stubbing in general doesn't cover proposed API, but plugins may be depend on it. So installing the Python plugin at the version @kenneth-marut-work listed will also install a Jupyter plugin, and given our current declared API version, that plugin will look for the onDidChangeNotebookCellExecutionStatus proposed API and fail when it doesn't find it:

extension activation failed TypeError: this.vscNotebook.onDidChangeNotebookCellExecutionState is not a function
    at new S (/tmp/vscode-unpacked/ms-toolsai.jupyter-2022.5.1001610507/extension/out/extension.node.js:2:1231426)
    at Object.t.resolveInstance (/tmp/vscode-unpacked/ms-toolsai.jupyter-2022.5.1001610507/extension/out/extension.node.js:2:2866223)

@colin-grant-work
Copy link
Contributor

A little bit of digging suggests that there problems either internal to the plugin or has to do with our implementation of dynamic debug configurations.

The plugin around the specified version has code like this:

https://github.com/microsoft/vscode-python/blob/ad0286c9c44884c6d43a7648b14ca69bec9ae989/src/client/debugger/extension/configuration/dynamicdebugConfigurationService.ts#L18-L24

https://github.com/microsoft/vscode-python/blob/ad0286c9c44884c6d43a7648b14ca69bec9ae989/src/client/debugger/extension/types.ts#L46-L47

And DebugConfigurationProvider has this declaration:

        /**
         * Provides {@link DebugConfiguration debug configuration} to the debug service. If more than one debug configuration provider is
         * registered for the same type, debug configurations are concatenated in arbitrary order.
         *
         * @param folder The workspace folder for which the configurations are used or `undefined` for a folderless setup.
         * @param token A cancellation token.
         * @return An array of {@link DebugConfiguration debug configurations}.
         */
        provideDebugConfigurations?(folder: WorkspaceFolder | undefined, token?: CancellationToken): ProviderResult<DebugConfiguration[]>;

So the class in the plugin just isn't handling the case where the folder argument can be undefined. That's certainly bad on their part, but it raises the question of whether there's a reason they were able to get away with. Is our version of the dynamic debug configuration work making calls that VSCode wouldn't?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system python issues related to the python language / extension
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants