open-vsx / publish-extensions

Scripts for publishing VS Code extensions to open-vsx.org
Eclipse Public License 2.0
225 stars 200 forks source link

Add `swyddfa.esbonio` (#741) #742

Closed tchernobog closed 3 months ago

tchernobog commented 4 months ago

Description

Add swyddfa.esbonio (#741).

Author has manifested interest in publishing to OpenVSX once this hits version 1.0, but I would like a temporary solution for now as 1.0 might be several months away.

tchernobog commented 4 months ago

Thanks @filiptronicek for catching this. I fixed the build, but I still have one problem.

As far as I can tell, the code in open-vsx/publish-extensions tries to infer the latest version of an extension using the github repository tags.

Unfortunately, the extension uses a non-standard format. The latest tag is currently for an older release from a different branch than mainline (called here develop).

Here we need to consider only those tags that match esbonio-vscode-extension-v*. The latest version is 0.92.1.

The latest tag is for esbonio-language-server-v0.16.4 which in turn contains the code for a very old 0.11.0 extension.

During the build it's easy for me to fix the checked out tag, but as the context is already set at that point, the wrong version is published:

{
  "context": {
    "msVersion": "0.11.0",
    "msLastUpdated": "2023-03-06T22:51:28.410Z",
    "msInstalls": 13902,
    "msPublisher": "swyddfa",
    "version": "0.11.0",
    "repo": "/tmp/repository/main",
    "ref": "esbonio-language-server-v0.16.4"
  }
}

How can this be fixed? I don't see anything in the JSON schema.

filiptronicek commented 4 months ago

Thanks for looking into this further, @tchernobog. Does this mean that the currently built package for esbonio-0.92.1.vsix is incorrect, or did your git checkout tricks work out in the custom instructions?

The setup here looks quite complex and difficult to maintain, so I think it would be best to publish the current latest version manually and wait for the author to publish the 1.0 release themselves as you mentioned.

tchernobog commented 4 months ago

@filiptronicek the results in term of package seem fine.

The only problem is that the deduced version seems wrong (0.11.0). If the result of this run is indeed esbonio-0.92.1.vsix then this is working well, if it deduces it as esbonio-0.11.0.vsix then it's wrong.

The build job seems fine: https://github.com/open-vsx/publish-extensions/actions/runs/7893644227/job/21542661844?pr=742#step:9:418

The question is if the context is still used when publishing somehow, because it shows a different version: https://github.com/open-vsx/publish-extensions/actions/runs/7893644227/job/21542661844?pr=742#step:9:142

If the context is ignored while pushing to the marketplace, then this change should be fine.

filiptronicek commented 3 months ago

I see the issue now, thanks for pointing it out.

When publishing, this context is not used and the only version info, which is what is actually listed in the packaged extension (Open VSX takes care of that).

I am publishing v0.92.1 now

filiptronicek commented 3 months ago

Published: https://open-vsx.org/extension/swyddfa/esbonio 🎉