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

ThemeIcons used by vscode extensions do not load correctly #10010

Closed
msujew opened this issue Aug 31, 2021 · 2 comments · Fixed by #10012
Closed

ThemeIcons used by vscode extensions do not load correctly #10010

msujew opened this issue Aug 31, 2021 · 2 comments · Fixed by #10012
Labels
bug bugs found in the application vscode issues related to VSCode compatibility

Comments

@msujew
Copy link
Member

msujew commented Aug 31, 2021

Bug Description:

See title. I assume this regression was introduced by #9436 as the instanceof check fails here:

} else if (iconPath instanceof ThemeIcon) {

Steps to Reproduce:

  1. Install the npm extension (built-in)
  2. Open the npm view
  3. Notice the missing icon

Additional Information

  • Operating System: Ubuntu (Gitpod)
  • Theia Version: a7d63a0
@msujew msujew added bug bugs found in the application vscode issues related to VSCode compatibility labels Aug 31, 2021
@tsmaeder
Copy link
Contributor

Just for my understanding: why is the instanceof failing?

@msujew
Copy link
Member Author

msujew commented Aug 31, 2021

@tsmaeder As far as I understand the different ES versions, ES5 classes work quite differently from classes in newer ES versions. That's why the @es5Compatibility annotation is needed, so that extensions compiled with es5 can still use them without issues.

That however introduces a problem related to the TypeScript compiler which tries to emit newer ES2017 instanceof calls for classes compiled to ES5, which just don't work. The prototype chain seems to be completely different, as Object.getProtoTypeOf(iconPath) === ThemeIcon.prototype returns false as well, even when the debugger shows the prototype of iconPath to be ThemeIcon.

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 vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants