-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Theia plugin API theia.commands.registerCommand is incompatible with VSCode #7295
Comments
fixed theia.commands.registerCommand to be compatible with VSCode Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
proposed solution, see PR #7296 |
….commands.registerCommand to be compatible with VSCodeSigned-off-by: Jonas Helming <jhelming@eclipsesource.com> Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
@JonasHelming I wonder whether it is really important for you to use |
I was on PTO last week so I haven't commented but I think we said that idea was to use But let say if you want to register custom namespace then you'll just import it. for example
|
How do you check at runtime whether With acquire API typescript fails at the compilation time, plus one does not need to hook into the plugin system anymore to add a new namespace. namespace API is built based on generic commands wrapped in an API object. It could allow to move in the direction of #6353 (comment) to make support of VS Code extensions easier but at the same time support custom namespaces on the top. (fyi) I'm not going to do anything about it :) I'm just entertaining an idea of how to make our maintenance effort easier. |
@benoitf : |
@JonasHelming there are more differences, you can see them plugin-vscode-init.ts, i.e. theia.plugins vs vscode.extensions namespace. |
@JonasHelming yes it's a shift of paradigm. |
@akosyakov : Yes, found that, I believe my PR removes one of those differences. It is probably the one that most users will immediatly notice, as it breaks every simple "hello world" example. @benoitf : OK, thank you for the clarification, that makes a lot of sense! However, if that is decided, wouldn't it make sense to NOT advocate the use of the theia namespace for plugin developers atm, but rather the use of the vscode namespace? |
It has to be discussed with @svenefftinge and @marcdumais-work. The initial idea, at least from our side, was to gain credibility by being compatible with VS Code extensions and we liked very much that RedHat team took this concern and aligned theia.d.ts with vscode.d.ts. We gain a lot by relying on any improvements done by VS Code team, and diverging will for sure harm it as well as Theia participation in the VS Code ecosystem. If VS Code won't have a leverage like many end users and extensions or Theia has many, I think we could discuss a different approach. But in the current situation embracing VS Code and letting to extend it is the best choice. |
@svenefftinge @marcdumais-work any thoughts on this?
|
Hi @JonasHelming ,
This one seems relatively simple to decide. If I understand correctly, the proposed change does not break backward compatibility and, at least until we officially decide where to go with the namespaces, it will likely be useful to plugin developers that are familiar with the VS Code API and might be annoyed by this small incompatibility, while almost everything else is identical. So, IMHO, there is no downside accepting this small contribution, other than the fact that it may not matter for very long, once we proceed with something like #6353 (comment) . Am I missing something? |
…VSCode eclipse-theia#7295 fixed theia.commands.registerCommand to be compatible with VSCode Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
…theia#7295 fixed theia.commands.registerCommand to be compatible with VSCode Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
fixed theia.commands.registerCommand to be compatible with VSCode Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
Description
As stated here, the Theia plugin API should be a strict super set of the VSCode extension API. theia.commands.registerCommand does only allow to register (CommandsDescription, handler), but not (commandID: string, handler) as VSCode does.
Reproduction Steps
The first registration below does not compile, the other two do.
OS and Theia version:
latest
The text was updated successfully, but these errors were encountered: