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

Add ${targetPlatform} placeholder for plugin downloads #12410

Conversation

jonah-iden
Copy link
Contributor

@jonah-iden jonah-iden commented Apr 13, 2023

What it does

This allows the usage of placeholders in plugin urls for the theia download:plugins task. Specificly adds the ${targetPlatform} placeholder to download non universal plugins by the bundling machines operating system and cpu arcitecture.

usage looks like this:

"theiaPlugins": {
   ...
   "rust-analyzer": "https://open-vsx.org/api/rust-lang/rust-analyzer/${targetPlatform}/0.4.1473/file/rust-lang.rust-analyzer-0.4.1473@${targetPlatform}.vsix"
}

How to test

  1. Add "rust-analyzer": "https://open-vsx.org/api/rust-lang/rust-analyzer/${targetPlatform}/0.4.1473/file/rust-lang.rust-analyzer-0.4.1473@${targetPlatform}.vsix" to your theiaPlugins
  2. Execute theia download:plugins
  3. Assert that the rust-analyzer plugin in the plugins folder is using the correct system binary.

Review checklist

Reminder for reviewers

@msujew msujew changed the title option for using a ${targetPlatform} placeholder in theiaPlugins urls for non universal plugins Add ${targetPlatform} placeholder for plugin downloads Apr 13, 2023
@msujew msujew added plug-in system issues related to the plug-in system theia-cli issues related to the theia-cli labels Apr 13, 2023
dev-packages/cli/src/download-plugins.ts Outdated Show resolved Hide resolved
dev-packages/cli/src/download-plugins.ts Outdated Show resolved Hide resolved
dev-packages/cli/src/download-plugins.ts Outdated Show resolved Hide resolved
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

Apart from what Mark wrote, I think the feature is a little hidden at this time, can we update https://github.com/eclipse-theia/theia/tree/master/dev-packages/cli#downloading-plugins to provide some information on the feature for end-users?

@jonah-iden
Copy link
Contributor Author

updated the readme to document the feature

dev-packages/cli/src/download-plugins.ts Outdated Show resolved Hide resolved
dev-packages/cli/src/download-plugins.ts Outdated Show resolved Hide resolved
dev-packages/cli/README.md Outdated Show resolved Hide resolved
@jonah-iden jonah-iden force-pushed the jiden/target-placeholder-plugin-download-url branch from 795613c to b5f256a Compare April 14, 2023 11:15
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.

Looks good to me 👍

I have tested the functionality on Ubuntu and Windows machines. On both systems, the modified script downloads the respective version of the vscode extension as expected.

jonah-iden and others added 5 commits April 17, 2023 15:31
in plugin download urls

Signed-off-by: Jonah Iden <[email protected]>
use regex escape lib,
use record,
updated README for new feature

Signed-off-by: Jonah Iden <[email protected]>
@jonah-iden jonah-iden force-pushed the jiden/target-placeholder-plugin-download-url branch from b5f256a to 00c64c9 Compare April 17, 2023 13:31
This was referenced Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plug-in system issues related to the plug-in system theia-cli issues related to the theia-cli
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants