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

[Bug]: bazel vendor is broken #292

Open
amari opened this issue Feb 2, 2025 · 1 comment
Open

[Bug]: bazel vendor is broken #292

amari opened this issue Feb 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@amari
Copy link

amari commented Feb 2, 2025

What happened?

bazel vendor --vendor_dir=... fails due to ERROR: key "linux-arm64-gnu" not found in dictionary.

This is related to #289, and is caused by the upstream bug swc-project/swc#9769.

In short, upstream stopped publishing releases for linux-arm64-gnu after v1.7.14. The only other 64-bit ARM Linux Release is swc-linux-arm64-musl.

Also, it looks like some tests are missing. Somehow a 32-bit ARM Linux artifact made its way into TOOL_VERSIONS:

"linux-arm-gnueabihf": "sha384-g6yFrvp0xsyScv+TukxmS0kaWVIOoics8eDM7/I/HJQhT5UWsLues80I73QWe3ql",

But there is no 32-bit ARM Linux platform:

"linux-arm64-gnu": struct(
compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:aarch64",
],
),
"linux-x64-gnu": struct(
compatible_with = [
"@platforms//os:linux",
"@platforms//cpu:x86_64",
],
),

Version

Development (host) and target OS/architectures: 64-bit macOS Apple M2 and Intel

Output of bazel --version: bazel 8.0.1

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file: 2.3.0

Language(s) and/or frameworks involved:
N/A

How to reproduce

1. Clone https://github.com/amari/rules_swc_repro

2. Run `bazel vendor --vendor_dir=vendor`

Any other information?

bazel vendor pulls in all the toolchains regardless of constraint matching, so it would serve as a good basis for a test.

IIRC the *-gnu and *-musl ABIs have/expect different libc.so paths, so I'd expect things to break catastrophically if they were simply substituted.

I don't have an environment to test this.

The quickest remedy would be to drop support for 64-bit ARM Linux and add it again after proper testing has been done.

@amari amari added the bug Something isn't working label Feb 2, 2025
@fmeum
Copy link

fmeum commented Feb 25, 2025

Have you tried running bazel vendor with a target pattern such as //...? That would avoid the download of toolchains for other platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants