rust-analyzer: New versions not available on OpenVSX (platform-specific VSIXes)

EDIT: see https://github.com/rust-analyzer/rust-analyzer/issues/11080#issuecomment-1010840901


rust-analyzer version: “Rust Analyzer: Show RA Version” command does nor exist, extension install dir: matklad.rust-analyzer-0.2.867

rustc version: rustc 1.56.0 (09c42c458 2021-10-18)

OS Version: Ubuntu 18.04.6

VS Code version: I use VSCodium 1.63.2

Today, rust-analyzer updated itself and stop working with the error:

INFO [12/21/2021, 11:18:12 AM]: Using server binary at /home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer
ERROR [12/21/2021, 11:18:12 AM]: Bootstrap error [Error: Failed to execute /home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer --version
	at j0 (/home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:109:4032)
	at processTicksAndRejections (internal/process/task_queues.js:93:5)
	at async N0 (/home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:109:1881)
	at async I0 (/home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:108:3977)
	at async lC (/home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/out/main.js:108:3808)
	at async Promise.all (index 0)
	at async v.$activate (/usr/share/codium/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:100:20806)]

The file /home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer but cannot be executed, even manually:

$ /home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer --version
bash: /home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer: No such file or directory

While the file exists.

But ldd on it shows the missing musl lib:

ldd /home/user/.vscode-oss/extensions/matklad.rust-analyzer-0.2.867/server/rust-analyzer
        linux-vdso.so.1 (0x00007ffce3bfa000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5dc6a52000)
        libc.musl-x86_64.so.1 => not found
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5dc6661000)
        /lib/ld-musl-x86_64.so.1 => /lib64/ld-linux-x86-64.so.2 (0x00007f5dc8490000)

I had a VSCodium update yesterday so it might be related.

I have tried to uninstall the extension but it installs the same version.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 45
  • Comments: 54 (26 by maintainers)

Commits related to this issue

Most upvoted comments

A similar problem exists on ArchLinux.

That issue is now closed, is there a new blocker I’m unaware of?

Yes. We’ve moved namespaces (from matklad to rust-lang) on the official marketplace. We could publish it today on OpenVSX under matklad, but that would probably cause unnecessary confusion. I’ve asked someone from the infrastructure team to register the rust-lang namespace and give us an API token, hopefully they’ll agree.

A corresponding PR for OpenVSX: eclipse/openvsx#406

Hello again everyone! I am pleased to announce that the blocking PR was merged about a half an hour ago.

What’s next?

The steps neccesary for publishing are as follows:

  1. Create a claim ownership request in the https://github.com/EclipseFdn/open-vsx.org repo [1]
  2. Sign up for OpenVSX and get the required access token by following https://github.com/eclipse/openvsx/wiki/Publishing-Extensions (steps 1-3)
  3. Change the release workflow to allow publishing via ovsx - add the following two steps again, just replacing npx vsce with npx ovsx (also requires to change the name of the secret token, for example OPENVSX_TOKEN and adding it to your repository secrets).

https://github.com/rust-analyzer/rust-analyzer/blob/46d7ee68f26285db26b2640f2c07d6332380c756/.github/workflows/release.yaml#L249-L258

As a work-around, you can do one of these:

  • disable updates and update manually from a GitHub release every once in a while
  • use the non-free version of Code (on Arch, there’s an AUR package for it, Ubuntu must have a snap)
  • install the language server separately (on Arch there’s a community package) and set rust-analyzer.server.path

I wouldn’t recommend using the third solution, because the old Code extension might not work very well with a newer server binary.

rust-analyzer is now available on OpenVSX: https://open-vsx.org/extension/rust-lang/rust-analyzer.

That’s only a pre-release version, you get an error if you try to install it, but you can still use the “Install Pre-Release Version” option to get it.

Thanks @amvanbaren and kineticSquid for the help!

Update: we got the namespace/access token sorted out, but publishing appears to fail on the OVSX side: https://github.com/rust-lang/rust-analyzer/runs/7103624175?check_suite_focus=true#step:23:25.

https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/1330

For a quick status update: over at OpenVSX we are trying to remove the non-working versions to make the extension work at least, but are running into some issues on our end (see https://github.com/EclipseFdn/open-vsx.org/issues/814 & https://github.com/EclipseFdn/open-vsx.org/issues/816). I removed this extension from auto-publishing to OpenVSX (because of https://github.com/open-vsx/publish-extensions/issues/527) and hope to get the extension directly to OpenVSX back soon 🤞.

Hey all! Good news, https://open-vsx.org/ has deployed the change with pre-releases and platform-specific releases, so this should be good to go 🎉

cc @lnicola

Has there been any progress on this?

@lnicola thanks for noting the absent publish to NPM. It is indeed needed and I have let the team know, hopefully we’ll see a release in the next few days.

Quickest way to “fix” it for me was installing an older version from within VSCodium (also, disable auto updates) (rightclick extension > Install Another Version… > 0.2.853 worked for me)

@lnicola the size limit is per-file, not per extension or any total of published, so that shouldn’t be the issue. 👀

@filiptronicek I don’t think so, since https://marketplace.visualstudio.com/items?itemName=REditorSupport.r has similar issues and it doesn’t have platform-specific binaries; same for ms-vscode.mock-debug.

EDIT: our VSIX is around 16 MB, so it shouldn’t be the 32 MB limit either, unless it applies cumulatively.

@Aloso it for sure hasn’t. There’s some other issues we are tackling at the moment, but it’s still something we are aware about and working towards.

A corresponding PR for OpenVSX: https://github.com/eclipse/openvsx/pull/406

@lnicola is it possible to publish it under matklad namespace until open-vsx fix that bug? Open-vsx side doesn’t look very active.

Had the same issue. The fix worked for me.

Update: OpenVSX has now removed the newer versions. Now if you install it from there you will get an older, working version. I’ll update the issue title accordingly.

The vscode package registry is only allowed to be used by the vscode builds microsoft creates. These also contain a drm to make certain microsoft extensions work like the remote ssh, remote wsl and liveshare extensions. Any build from the source code in https://github.com/microsoft/vscode has to use an alternative package registry and isn’t allowed to use these extensions.

vscode on ArchLinux is also using open-vsx:

$ jq .extensionsGallery < product.json
{
  "serviceUrl": "https://open-vsx.org/vscode/gallery",
  "itemUrl": "https://open-vsx.org/vscode/item"
}

I think what happens is that:

  • VS Code 1.61 added support for platform-specific dependencies
  • downloading the server binaries from GitHub is a bit of a pain for us (sometimes the releases don’t get published and updates fail, some users with proxies have problems, coordinating between the nightly and stable builds is a bit of a pain, it’s a large surface for supply chain attacks and so on)
  • we implemented https://github.com/rust-analyzer/rust-analyzer/issues/10483 in https://github.com/rust-analyzer/rust-analyzer/pull/11053
  • VSCodium uses Open VSX
  • rust-analyzer gets published to Open VSX somehow (there’s an open issue, but we don’t have an account there and I don’t know how it gets there)
  • either Open VSX or the publishing process there doesn’t support platform-specific extensions
  • VSCodium users get a random version

I don’t think we want to give up on this change, but I don’t know any easy fix either.

Works for me too using the package provided by @lnicola which links ~musl statically~ the glibc.