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]: Toolchain resolution broken when using bzlmod and js_image_layer #1316

Closed
lqc opened this issue Oct 16, 2023 · 2 comments
Closed

[Bug]: Toolchain resolution broken when using bzlmod and js_image_layer #1316

lqc opened this issue Oct 16, 2023 · 2 comments
Labels
bug Something isn't working untriaged Requires traige

Comments

@lqc
Copy link

lqc commented Oct 16, 2023

What happened?

I am able to successfully build a working image by adding ":tarball" target to e2e/js_image_oci.

I tried to do the same on a copy of e2e/js_image_oci, but with WORKSPACE converted to bzlmod:

lqc@705f927

Whatever combination of "platform" and "toolchain" options I provide, I always end up with "js_image_layer" rule bundling the "darwin_amd64" Node.js instead of "linux_amd64".

This might be related to #883, so it might be Bazel's fault.

Unless your OS/arch matches exactly your target, the only was to use rules_js right now seems to be without bzlmod entriely (trying to keep only JS rules in WORKSPACE.bzlmod) didn't work for me either.

Version

Development (host) and target OS/architectures:

host: macOs 13.5.2 / Intel (amd64)
target: linux / amd64

Output of bazel --version:

aspect 5.7.2

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

See lqc@705f927

How to reproduce

No response

Any other information?

No response

@lqc lqc added the bug Something isn't working label Oct 16, 2023
@github-actions github-actions bot added the untriaged Requires traige label Oct 16, 2023
@jvliwanag
Copy link

Adding a note that a partial bzlmod (excluding only rules_js) still worked for my minimal reproduction here. In this sample, rules_oci was from bzlmod, while rules_js is defined in WORKSPACE.

Putting both on bzlmod didn't work though. See here.

host: macos 14.0 / M2
target: linux / arm64

@gregmagolan
Copy link
Member

Closing as a duplicate of #1530

@github-project-automation github-project-automation bot moved this to ✅ Done in Open Source May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged Requires traige
Projects
Status: Done
Development

No branches or pull requests

3 participants