[WIP] vscode-extensions: support multiple extension registries#121583
[WIP] vscode-extensions: support multiple extension registries#121583ShamrockLee wants to merge 6 commits intoNixOS:masterfrom
Conversation
1d54924 to
5de0e3c
Compare
pkgs/misc/vscode-extensions/nix-prefetch-vscode-mktplc/nix-prefetch-vscode-mktplc
Outdated
Show resolved
Hide resolved
pkgs/misc/vscode-extensions/nix-prefetch-vscode-mktplc/nix-prefetch-vscode-mktplc
Outdated
Show resolved
Hide resolved
pkgs/misc/vscode-extensions/nix-prefetch-vscode-mktplc/nix-prefetch-vscode-mktplc
Outdated
Show resolved
Hide resolved
pkgs/misc/vscode-extensions/nix-prefetch-openvsx/nix-prefetch-openvsx
Outdated
Show resolved
Hide resolved
pkgs/misc/vscode-extensions/nix-prefetch-openvsx/nix-prefetch-openvsx
Outdated
Show resolved
Hide resolved
pkgs/misc/vscode-extensions/nix-prefetch-openvsx/nix-prefetch-openvsx
Outdated
Show resolved
Hide resolved
pkgs/misc/vscode-extensions/nix-prefetch-openvsx/nix-prefetch-openvsx
Outdated
Show resolved
Hide resolved
adfeb18 to
f92ce1c
Compare
|
Modified The original way to handle exit in the |
|
@SuperSandro2000
|
Thats probably a good idea but I don't know the vscode package system that well to review the PRs well. |
|
Exposed |
|
Here's the code implementing the serviceUrl and itemUrl adapter in the Open VSX project: The corresponding urls are: "extensionsGallery": { "serviceUrl": "https://open-vsx.org/vscode/gallery", "itemUrl": "https://open-vsx.org/vscode/item" }They may help us figure out a way to query the extension list of VSCode Marketplace. |
|
I originally plan to extract extension identifiers from the BTW, I'm working on some fixes related to my research work, and is running out of time recently. It would take a while before I could port the custom build process here from |
4a4397a to
a2b386c
Compare
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/in-tree-or-out-of-tree/18389/1 |
|
I just encountered something called extension packs, which aren't managed properly by the current It's quite easy to get the information -- by fetching the attribute |
|
hey @ShamrockLee are you still working on this? I recently thought of the same kind of thing so I opened #197293, and I’m wondering if I should close in favor of this PR. |
|
This one is still relevant, and it should already work on extensions that doesn't require custom build process. We could also handle the extensionPack that comes along an extension with the new framework. It's rather easy to implement. There are some problems, through:
|
I think that sounds reasonable. Couldn’t any other things be done via the aliases in the current system anyway? |
|
The attribute renaming was made in commit 9ee8bd1 . It casted the letter to lower case to "keep the naming convention uniform". |
|
that doesn’t sound reasonable. IMO if the source is inconsistent it’d be inconsistent to make it consistent |
Drop the warnings for lib.meta.getLicenseFromSpdxId fallback to please the CI and for better user experience. Create lib.meta.getLicenseFromSpdxId', for which developers can specify the default value and possible warning/error.
* registry-lib: init * mkExtensionGeneral: init * modifiers: init
a2b386c to
5817f71
Compare
|
@schuelermine I didn't even realize that |
|
@ShamrockLee |
|
On 02.08.2023 15:44, Mateusz Franik wrote:
Are there any updates on this?
Sorry for disappearing for so long.
Here's the things done:
1. `registry-references-list.json` from OpenVSX can be generated
programmatically using `nix-prefetch-openvsx`.
2. `registry-references-list.json` from VSCode Marketplace are
generated manually, but is probably outdated.
3. All the extensions from `registry-references-list.json` that doesn't
need special build process can be built.
Todo:
1. Unite the naming convention. Quite some extension attributes are
changed to lower case instead of following the "extension publisher" and
"extension name" from the upstream. I personally think it's a good idea
to rename them back.
2. Port all the custom build process to to the new framework. This
requires a lot of manual work against a moving target (the current
extension set), and is the main blocker of this PR.
3. The old VSCode marketplace asset URLs cannot fetch some new
extensions, and the relevant URLs seem to come with certain filters that
blocks direct `curl`s. This affects not only this PR and the
`nix-prefetch-vscode-marketplace` prefetcher, but also the current
extension set (built with
`vscode-utils.buildVscodeMarketplaceExtension`).
We would need to solve this with VSCode-like User Agent, or even
custom headers. This require inspecting against the VSCode OSS source
code.
4. Automate production of the `registry-references-list.json` from the
current extension set. This requires the hash-conversion builtin
function (NixOS/nix#7708). With such builtin
function, we could also convert SHA256 hash fetched from OpenVSX without
actually downloading the VSIX file and compute the hash.
5. Simplify the overlay structure. The one in this PR seems
over-engineered.
… --
Reply to this email directly, view it on GitHub [1], or unsubscribe
[2].
You are receiving this because you were mentioned.Message ID:
***@***.***>
Links:
------
[1]
#121583 (comment)
[2]
https://github.com/notifications/unsubscribe-auth/AKQF2M2HUAT2M66WHRV7W3DXTJKSLANCNFSM44AP6DBA
|
Motivation for this change
According to the Microsoft Visual Studio Marketplace Term of Use, VSCodium and editors other than the officially-built Visual Studio Code are prohibited from using "Marketplace Offerings" including extensions. These editors thus use the Open VSX Registry to provide extension searching/installation features instead of the Visual Studio Marketplace .
If applied, extensions will be downloaded from the Open VSX Registry by default to make them legally available to users of open-source vscode builds and other derived editors.This PR provides a framework to supply extensions from different registries. Four registies,
vscode-marketplace,openvsx,upstreamandstandalone, will be added.Two nix-prefetch packages,
nix-prefetch-openvsxandnix-prefetch-vscode-mktplcare included to make pre-fetching extensions. The output will be in JSON format similar tonix-prefetch-github.Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)