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

Wrap api objects returned to clients in a proxy #14213

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

tsmaeder
Copy link
Contributor

What it does

This PR wraps class-derived objects in the VS Code API inside a proxy. Additionally, any functions that are defined in the class prototype are bound to the object in question. This guards against the misuse of object methods as pure functions. As an additional bonus, clients no longer have access to the internals of the API objects like the main/ext proxies.

Fixes #13522

Contributed on behalf of STMicroelectronics

How to test

This one is hard to test comprehensively as it covers a large code surface. The best way is to work with a wide variety of plugins to verify that we have not missed any subtle interactions with the API object implementation.

Follow-ups

Review checklist

Reminder for reviewers

functions to the object.

Fixes eclipse-theia#13522

Contributed on behalf of STMicroelectronics

Signed-off-by: Thomas Mäder <[email protected]>
Signed-off-by: Thomas Mäder <[email protected]>
@tsmaeder
Copy link
Contributor Author

yarn browser test works on Windows, but not Linux. I was able to reproduce the failures in a VM. Investigating....

@tsmaeder tsmaeder requested a review from msujew October 2, 2024 12:58
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, looks good to me and I can confirm that the Latex Workshop plugin now works as expected in Theia! 🎉

@tsmaeder tsmaeder merged commit 7ea9c13 into eclipse-theia:master Oct 7, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Vscode extension LaTeX Workshop's Viewer does not open in Theia IDE in browser
2 participants