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

Bracket Pair Colorizer 2 #7573

Closed
dsseng opened this issue Apr 14, 2020 · 12 comments
Closed

Bracket Pair Colorizer 2 #7573

dsseng opened this issue Apr 14, 2020 · 12 comments
Labels
bug bugs found in the application help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility

Comments

@dsseng
Copy link
Contributor

dsseng commented Apr 14, 2020

Description

Bracket Pair Colorizer 2 (v0.0.9) extension doesn't activate and work.

Reproduction Steps

  1. Download Bracket Pair Colorizer 2 v0.0.9 from VS Marketplace as a VSIX file.
  2. Unpack it into a newly created folder in ~/.theia/extensions or prebuilt plugins folder
  3. Start Theia

OS and Theia version:
OS: Ubuntu 19.10
Theia: master

Diagnostics:
When I open Theia I get this error message:

Activating extension Bracket Pair Colorizer 2 failed: Cannot find module '/path/to/theia-repo/packages/plugin-ext/lib/plugin/node/node_modules.asar/vscode-textmate'.

In console, 2 of these messages are printed (console.warn):

``` root WARN ../../packages/monaco/lib/browser/textmate/textmate-registry.js/
@vince-fugnitto vince-fugnitto added the vscode issues related to VSCode compatibility label Apr 14, 2020
@vince-fugnitto
Copy link
Member

@sh7dm for your own information, one cannot use the VS Code Marketplace directly outside of official Microsoft products as it violates their terms of use (and is subsequently illegal). We have created open-vsx for that exact purpose, and if your extension is not provided, you can submit a request to include it (https://github.com/open-vsx/publish-extensions).

I suspect something may be missing during packaging and it is the reason vscode-textmate complains.

@dsseng
Copy link
Contributor Author

dsseng commented Apr 14, 2020

I know, I used the manually-download VSIX, that should work. Do you think the issue is on extension side?

@vince-fugnitto
Copy link
Member

I know, I used the manually-download VSIX, that should work. Do you think the issue is on extension side?

I'm checking out their repo and attempting to build it myself.
I do see it is still a beta, and their last publish was a while ago.

@vince-fugnitto
Copy link
Member

vince-fugnitto commented Apr 14, 2020

This method looks a bit fishy, the fact that it requires it but does not provide it itself makes me think that it is included in vscode by default (especially since it looks at the appRoot):

private getNodeModule(moduleName: string) {
    return require(`${vscode.env.appRoot}/node_modules.asar/${moduleName}`);
}

This seems to be a flaw/design decision by the extension to not provide it, and it is due to the fact that the author probably did not envision any other consumer (such as the framework), to be able to use the extension.

@dsseng
Copy link
Contributor Author

dsseng commented Apr 14, 2020

Probably this issue should be transferred there, I see that it's caused by extension.

@akosyakov
Copy link
Member

It is the same issue with keytar. We should add such packages as dependencies to @theia/plugin-ext-vscode, hook into require to intercept requests to such modules and implement own look up.

@akosyakov akosyakov added the help wanted issues meant to be picked up, require help label Apr 15, 2020
@dsseng
Copy link
Contributor Author

dsseng commented Apr 15, 2020

@akosyakov keytar issue also causes the failure of Docker extension.

@akosyakov
Copy link
Member

akosyakov commented Apr 15, 2020

I've added keytar to discuss on next dev meeting. It requires additional dependencies which is not always necessary (some product can have own implementation of persisting secrets) but such dependencies rely on additional system tools to be installed.

@akosyakov akosyakov added the bug bugs found in the application label Apr 15, 2020
@dsseng
Copy link
Contributor Author

dsseng commented Apr 17, 2020

Might be related to #6407

@studentIvan
Copy link

Sorry for the spam, but this is the really useful extension. Hope someday theia can have it.

@vince-fugnitto
Copy link
Member

Note that with #10736, we will benefit from having bracket colorizations directly from the application itself (like it is now done in vscode) which should be more performant than the plugins.

Additional Info:

@vince-fugnitto
Copy link
Member

vince-fugnitto commented Mar 24, 2022

Given that #10736 was merged, I'd be in favor of closing this issue.
The bracket pair colorizer should now be available by default in the framework.

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 help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

4 participants