-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Bug Description:
Same VSIX can be installed multiple times by renaming the VSIX file. This creates a new directory in deployedPlugins, but the IDE does not include contributions coming from the later installed VSIX
Steps to Reproduce:
- Generate a VSIX from https://github.com/microsoft/vscode-extension-samples/tree/main/helloworld-sample
- Move the VSIX file out of this project
- Rename the hello world command contribution to make it unique from the one generated in Step 1
- Generate VSIX again (keep name, version etc. info same)
- Now generate VSIX again, rename it to make the name different from the previous VSIX.
- Install the VSIX from Step 1
- Check Hello World command in the IDE, it should be available
- Install the VSIX from Step 5, it will also install successfully
- IDE list of installed extensions will only show the one installed first
- Check
deployedPlugins, it will have directories for both extensions - Check Hello World 2nd command (from the change made in Step 3), it is not available in the IDE
Result
Both extensions were installed and IDE shows only one in the installed list and command contributions are also only from the first installed extension.
Suggested Solution
Probably the IDE should validate name inside the package.json of the VSIX instead of the VSIX filename. Because the extension name is depending on the name defined in package.json. If this is done, the above steps should give an error at installing the renamed VSIX file.
Additional Information
This example does not affect the IDE rather hides contributions of the later installed VSIX, but if there is some application which reads some data from the installed extension's directory, that would start looking from two locations in this scenario whereas the IDE would show only one extension as installed. In such scenarios, this behavior can cause confusing and unexpected behaviors
- Operating System: Windows
- Theia Version: 1.67.0