Use targetPlatform
when installing plugin from open-vsx
#13825
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Closes #11291
Closes #13558
For a while now open-vsx has offered to query plugins using the
targetPlatform
filter. This adjusts Theia's open-vsx integration to respect the backend's target platform. This is related to #12410, which implemented this feature for the CLI.When using the filter, only plugin entries with the specified target platform are actually returned. That's why we have to also query
universal
after querying the platform specific plugins to ensure that we actually install the newest available extension.Also closes #11291 by using the new
v2
API endpoint which returns more compact results.How to test
Testing this works best when you have two different operating systems available. I used Windows (PC) and Ubuntu (Gitpod) to test this.
rust-analyzer
*.rs
file (it currently crashes onmaster
if you aren't accidentally on the correct OS)Follow-ups
I'm not sure this is how the open-vsx API is intended to be used. Querying the API multiple times for different target platforms (i.e. the backend platform +
universal
) seems a bit counterintuitive. We can maybe improve on this.Review checklist
Reminder for reviewers