-
Notifications
You must be signed in to change notification settings - Fork 13
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
VS Code API compatibility of ProviderResult #21
Comments
I can take a look. |
After some investigation i found out that there are some problems with the Thenable/PromiseLike checking in the code. In the end the current Theia main version of this line is parsed like it has no types, while all of the other verisons return two types
I guess a fix for this should not be too complicated, but maybe someone with more understanding of the parsing/comparison code (@lucas-koehler or @benoitf) has an idea where to look for. Maybe alongside this we could introduce debug support for the comparator to make debugging this easier? |
Hi @sgraband, unfortunately I don't know in detail where to look at but I can give you some initial pointers. Some pointer where I'd try to see how it's parsed is in vscode-theia-comparator/src/parser.ts Line 100 in 389faf3
hash will be different for the new signature for some reason.I'd also check around here in the comparator: https://github.com/eclipse-theia/vscode-theia-comparator/blob/master/src/comparator.ts#L234 This compares the hashs of two version entries. Might be a good point to debug to see the difference. Also, I'm all for adding some debug configs to make investigating issues like this easier :) |
So i was able to debug this a bit further. The issue seems to be that this line: vscode-theia-comparator/src/parser.ts Line 146 in 389faf3
evaluates to the correct type when parsing from the VSCode file, but evaluates to an What i find strange is that it works for the VSCode file as there seems to be no difference between parsing VSCode API and the Theia API. Or is there something that i am missing? |
Together with @lucas-koehler we were able to find the issue of this. The Thenable type is directly defined in the vscode-files but not in the theia-files. Therefore, the parser cannot get the type and instead returns IMHO we should not use types, that aren't defined in typescript or the file itself, in the API files. I would propose to change all We also noticed, that the existing theia |
Thanks for investigating this issue! |
Opened eclipse-theia/theia#11214 for this. Will close this! |
After the discussion eclipse-theia/theia/issues#11214 the `PromiseLike` Type was removed from the `theia.d.ts` file and replaced with `Thenable`. With this we should stop changing around these values in the comparator, as this could lead to site effects. E.g. currently, the `ProviderResult#Thenable` is marked as unsupported. This is fixed with this. Furthermore, this will allow us to spot future usages of `PromiseLike`s more easily. Follow up for eclipse-theia#21.
After the discussion eclipse-theia/theia/issues#11214 the `PromiseLike` Type was removed from the `theia.d.ts` file and replaced with `Thenable`. With this we should stop changing around these values in the comparator, as this could lead to site effects. E.g. currently, the `ProviderResult#Thenable` is marked as unsupported. This is fixed with this. Furthermore, this will allow us to spot future usages of `PromiseLike`s more easily. Follow up for eclipse-theia#21. Contributed on behalf of STMicroelectronics
After the discussion eclipse-theia/theia/issues#11214 the `PromiseLike` Type was removed from the `theia.d.ts` file and replaced with `Thenable`. With this we should stop changing around these values in the comparator, as this could lead to site effects. E.g. currently, the `ProviderResult#Thenable` is marked as unsupported. This is fixed with this. Furthermore, this will allow us to spot future usages of `PromiseLike`s more easily. Follow up for #21. Contributed on behalf of STMicroelectronics
The vscode-theia-comparator report shows
ProviderResult
as incompatible on master, but considered it as compatible in the last Theia release.This seems to be related to change eclipse-theia/theia@e6b57ba, after which it is defined as follows in Theia:
In VS Code it is defined as follows (ie equivalent to how it is now in Theia):
Before the change linked above, it was defined as follows in Theia and was deemed OK:
The text was updated successfully, but these errors were encountered: