-
Notifications
You must be signed in to change notification settings - Fork 141
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
Infer publish target
from package manifest & allow multiple --packagePath
args
#461
Comments
@radeksimko The main difference between Lines 36 to 41 in 72706d1
open-vsx.org doesn't support target platform yet. It might be useful to add a compatibility check in Do the same issues pop up when you run the master branch locally or on Gitpod? |
Oh that's good to know actually! That would be another blocker I'd hit straight away once open-vsx.org supports target platforms. 😅 Does that mean it's impossible to build the packages once and publish them both to MS Marketplace and open-vsx.org if we need platform-specific builds?
Assuming vsix is basically just a ZIP file and the manifest is XML - both being non-proprietary files, is there a reason why ovsx can't read the vsix and infer the target from there?
👍🏻 💯 totally - that would have saved a lot of my time and attempts earlier 😄
You mean when I try to spin up my own open-vsx.org server locally? I can try that. I don't understand your reference to Gitpod though - I thought Gitpod is just another "consumer" of extensions from open-vsx.org - where does publishing come into this? |
It can, but for now the server reads the target from the XML manifest and performs the same type of checks server-side. As bandwith usage grows it's better to duplicate this logic to
Gitpod is a cloud developer tool that provides ready-to-code workspaces. And yes, they also use open-vsx.org to provision workspaces with the right extensions 😄. You can install the Gitpod browser addon or create a new workspace at https://gitpod.io/workspaces. It saves you the trouble of setting up PostgreSQL, ElasticSearch, running the webui and server, and publishing some test extensions. |
I have to say I am somewhat struggling to stand up the dev environment in gitpod. I am not familiar with Java, so maybe I'm missing something obvious. Both Postgres and ElasticSearch seem to be running but I was unable to start the server itself
https://gist.github.com/radeksimko/b864ce47e964f921815e9847b918bb43 |
Here's how I open Open VSX in Gitpod:
|
That's a bug in both the server and PR #482 addresses these issues. If you want you can test it by running the server on Gitpod and building the cli locally.
There's been some progress. You can follow the current status through issue https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/1483 |
I'm not sure if this relates to #450 (comment) at all - i.e. the server not reflecting target at all. A quick look into the codebase would suggest it doesn't - feel free to correct me if I'm wrong though!
Currently
ovsx
behaviour seems to differ fromvsce
in that it essentially requires--target
/-t
for platform-specific publishing. When the flag is omitted and platform-specific vsix is provided via--packagePath
, that vsix is uploaded as what appears to be universal build.The mentioned
publish
command with$(find ...)
represents IMO common workflow in CI, where targets are inferred from the manifest inside vsix, which is what vsce seems to do:https://github.com/microsoft/vscode-vsce/blob/2ec05b137bdbfa743e10c674241396f1cd86e5aa/src/publish.ts#L47-L54
ovsx
does seem to support publishing of multiple targets at a time, but AFAICT they still have to be passed explicitly to--target
:openvsx/cli/src/publish.ts
Lines 21 to 28 in 72706d1
I think that aligning the two flags' behaviour with vsce would be useful.
More importantly I think that
ovsx
should prevent publishing platform-specific extension as universal as that leaves it broken for everyone except for the one platform, which is especially unfortunate when such versions can't be unpublished. That is - even if you decide to not infertarget
and not support multiple args inpackagePath
, ovsx should error out in the above cases.The text was updated successfully, but these errors were encountered: