eclipse / openvsx

An open-source registry for VS Code extensions
https://open-vsx.org/
Eclipse Public License 2.0
1.27k stars 144 forks source link

[Feature request] Divisions system like Debian. #335

Open HuJK opened 3 years ago

HuJK commented 3 years ago

There is a lot of good extensions such as vscode-cpptools, but openvsx accept open source project only so that it can never be add to openvsx.

I think we can learn from debian registry, introduce the divisions system from it to make our registry more inclusive.

Debian has these divisions:

  1. main: All free software that follows the DFSG (Debian Free Software Guidelines)
  2. contrib: Free software that follows DFSG but depends on software in non-free.
  3. non-free: All kinds of non-free software that doesn't follow the DFSG.

and we can specify the enabled divisions in the url like this:

"extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery?divisions=main,contrib,non-free",
    "itemUrl": "https://open-vsx.org/vscode/item?divisions=main,contrib,non-free"
}

Or like this

"extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery/divisions/main/contrib/non-free",
    "itemUrl": "https://open-vsx.org/vscode/item/divisions/main/contrib/non-free"
}

It allows us to choose whether use non-free extensions or not.

Not only for this use case, the division system also useful if we host our private openvsx.
We can create divisions such as stable,testing, to make things more easily instead of host two registry.

spoenemann commented 3 years ago

Thanks for kicking off this discussion! Note that the public instance running at open-vsx.org is maintained by the Eclipse Foundation at https://github.com/EclipseFdn/open-vsx.org/issues, while this repository is for the reusable source code of Open VSX. I cannot transfer the issue directly, so could you please open a new one?

openvsx accept open source project only

That's not true. The auto-publishing script at https://github.com/open-vsx/publish-extensions accepts only open source extensions, but as an individual user you can publish proprietary extensions, provided you have the permission by the authors to do so. This is explained in the Publisher Agreement:

https://open-vsx.org/publisher-agreement-v1.0#section-4-licensing-of-offerings-and-support

Here the stated requirement is that a published extension must have a license, but it does not restrict which kind of license.

HuJK commented 3 years ago

Yes, but before adding contrib/non-free divisions to open-vsx.org, I think the "division system" is required, right?

Do we have a system like that? If I have a extension A, I can upload the stable version to stable , and upload beta version to test. And there is an another extension B don't in test division.

I can enable stable and test at same time, so that I can get beta version of A and stable version of B without switching registries.

If don't, can I reopen this issue? Or this issue should also put in https://github.com/EclipseFdn/open-vsx.org/issues instead of here?

spoenemann commented 3 years ago

There is a notion of "version aliases", which are currently shown as latest and preview in the UI.

Example:

This is controlled via the Boolean preview flag in the package.json of a published extension (see Extension Manifest documentation).

Is that enough for your needs?