Skip to content
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

Support PPC64 architecture on Open VSX marketplace #645

Open
tom-miller1 opened this issue Nov 25, 2024 · 6 comments
Open

Support PPC64 architecture on Open VSX marketplace #645

tom-miller1 opened this issue Nov 25, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@tom-miller1
Copy link

Ruff works flawlessly on the ppc64le architecture. The Ruff VSCode extension also works great under the Codium builds for PPC64 if we manually install the vsix file from x86 and then tell the extension to use the environment version of Ruff instead of bundled. It would be great if you could add ppc64le to the build and deploy target list for the Open VSX marketplace to provide a "native" extension for that platform. I tried to create a fork and make the changes myself but got hopelessly lost trying to figure out exactly what was necessary.

@MichaReiser
Copy link
Member

We would need to extend our release matrix here

- os: windows-latest
target: x86_64-pc-windows-msvc
code-target: win32-x64
- os: windows-latest
target: aarch64-pc-windows-msvc
and add a PPC64 build for both VS code and the VSX marketplace

@dhruvmanila dhruvmanila changed the title Please support PPC64 architecture on Open VSX marketplace Support PPC64 architecture on Open VSX marketplace Nov 27, 2024
@dhruvmanila dhruvmanila added the enhancement New feature or request label Feb 12, 2025
@tom-miller1
Copy link
Author

The current method of packaging platform-specific versions of the Ruff binary prevents this from being easily fixed. If I simply add ppc64 to the build matrix, then the vsce process will fail because ppc64 is not a supported build target by Microsoft. There should be a method to create a universal extension that doesn't include the Ruff binary but attempts to download it on first extension load, but that is way beyond my skill set and would need to be secure to avoid malicious actors injecting a compromised Ruff binary. Open to suggestions, but I think this is impossible with the current build style unless and until Microsoft supports ppc64 natively.

@dhruvmanila
Copy link
Member

There should be a method to create a universal extension that doesn't include the Ruff binary but attempts to download it on first extension load, but that is way beyond my skill set and would need to be secure to avoid malicious actors injecting a compromised Ruff binary.

I think Biome's VS Code extension does something similar https://github.com/biomejs/biome-vscode/blob/main/src/downloader.ts to download the release assets using GitHub's API.

@MichaReiser
Copy link
Member

Which step exactly is failing? Could we use vsce publish --noVerify

@tom-miller1
Copy link
Author

tom-miller1 commented Mar 3, 2025

It's the packaging step that fails. The vsce tool does a target check against a hard-coded list of known architectures, and linux-ppc64/linux-ppc64le are not considered valid.

❯ npx vsce package -o "./dist/ruff-linux-ppc64le.vsix" --target linux-ppc64le
Executing prepublish script 'npm run vscode:prepublish'...

> [email protected] vscode:prepublish
> npm run package


> [email protected] package
> webpack --mode production --devtool source-map --config ./webpack.config.js

    [webpack-cli] Compiler starting... 
    [webpack-cli] Compiler is using config: '/Users/tmiller/Documents/devops/ruff-vscode/webpack.config.js'
asset extension.js 394 KiB [compared for emit] [minimized] (name: main) 1 related asset
runtime modules 670 bytes 3 modules
modules by path ./node_modules/ 922 KiB 163 modules
modules by path ./src/ 58.4 KiB
  ./src/extension.ts 7.26 KiB [built] [code generated]
  ./src/common/logger.ts 2.79 KiB [built] [code generated]
  ./src/common/python.ts 2.89 KiB [built] [code generated]
  + 9 modules
+ 12 modules
webpack 5.98.0 compiled successfully in 2868 ms
    [webpack-cli] Compiler finished
 ERROR  'linux-ppc64le' is not a valid VS Code target. Valid targets: win32-x64, win32-arm64, linux-x64, linux-arm64, linux-armhf, darwin-x64, darwin-arm64, alpine-x64, alpine-arm64, web

@MichaReiser
Copy link
Member

Oh I see. This is then related to microsoft/vscode-vsce#1105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants