Skip to content

Conversation

dennisameling
Copy link

Some dependencies are missing for windows_arm64, resulting in failing builds like this one:

ERROR: Traceback (most recent call last):
	File "C:/_bazel/external/aspect_rules_js~/npm/extensions.bzl", line 34, column 41, in _npm_extension_impl
		_npm_lock_imports_bzlmod(module_ctx, attr)
	File "C:/_bazel/external/aspect_rules_js~/npm/extensions.bzl", line 79, column 41, in _npm_lock_imports_bzlmod
		state = npm_translate_lock_state.new(attr.name, module_ctx, attr, True)
	File "C:/_bazel/external/aspect_rules_js~/npm/private/npm_translate_lock_state.bzl", line 590, column 10, in _new
		_init(priv, rctx, attr, label_store)
	File "C:/_bazel/external/aspect_rules_js~/npm/private/npm_translate_lock_state.bzl", line 37, column 24, in _init
		_init_common_labels(priv, rctx, attr, label_store, is_windows)
	File "C:/_bazel/external/aspect_rules_js~/npm/private/npm_translate_lock_state.bzl", line 119, column 20, in _init_common_labels
		label_store.add("host_yq", Label("@{}_{}//:yq{}".format(attr.yq_toolchain_prefix, repo_utils.platform(rctx), ".exe" if is_windows else "")))
	File "C:/_bazel/external/aspect_rules_js~/npm/private/repository_label_store.bzl", line 104, column 57, in lambda
		add = lambda key, label, seed_root = False: _add(priv, rctx_path, repo_root, key, label, seed_root),
	File "C:/_bazel/external/aspect_rules_js~/npm/private/repository_label_store.bzl", line 39, column 39, in _add
		priv["paths"][key] = str(rctx_path(label))
Error in path: Unable to load package for @@[unknown repo 'yq_windows_arm64' requested from @@aspect_rules_js~]//:yq.exe: The repository '@@[unknown repo 'yq_windows_arm64' requested from @@aspect_rules_js~]' could not be resolved: No repository visible as '@yq_windows_arm64' from repository '@@aspect_rules_js~'

Upstream supports arm64 already, so we just have to add it here.


Changes are visible to end-users: yes/no

  • Searched for relevant documentation and updated as needed: yes/no
  • Breaking change (forces users to change their own code or config): yes/no
  • Suggested release notes appear below: yes/no

Test plan

  • Covered by existing test cases
  • New test cases added
  • Manual testing; please provide instructions so we can reproduce:

Copy link

aspect-workflows bot commented Jul 13, 2025

Test

⚠️ Buildkite build #9108 failed.


Test

e2e/bzlmod

⚠️ Buildkite build #9108 failed.


Test

e2e/gyp_no_install_script

⚠️ Buildkite build #9108 failed.


Test

e2e/js_image_oci

⚠️ Buildkite build #9108 failed.


Test

e2e/npm_link_package

All tests were cache hits

3 tests (100.0%) were fully cached saving 533ms.


Test

e2e/npm_link_package-esm

All tests were cache hits

3 tests (100.0%) were fully cached saving 630ms.


Test

e2e/npm_translate_lock

⚠️ Buildkite build #9108 failed.


Test

e2e/npm_translate_lock_empty

⚠️ Buildkite build #9108 failed.


Test

e2e/npm_translate_lock_multi

⚠️ Buildkite build #9108 failed.


Test

e2e/npm_translate_lock_partial_clone

⚠️ Buildkite build #9108 failed.


Test

e2e/npm_translate_lock_replace_packages

⚠️ Buildkite build #9108 failed.


Test

e2e/npm_translate_lock_subdir_patch

⚠️ Buildkite build #9108 failed.


Test

e2e/npm_translate_package_lock

⚠️ Buildkite build #9108 failed.


Test

e2e/npm_translate_yarn_lock

⚠️ Buildkite build #9108 failed.


Test

e2e/package_json_module

⚠️ Buildkite build #9108 failed.


Test

e2e/pnpm_lockfiles

⚠️ Buildkite build #9108 failed.


Test

e2e/pnpm_workspace

⚠️ Buildkite build #9108 failed.


Test

e2e/pnpm_workspace_rerooted

⚠️ Buildkite build #9108 failed.


Test

e2e/repo_mapping

⚠️ Buildkite build #9108 failed.


Test

e2e/rules_foo

All tests were cache hits

2 tests (100.0%) were fully cached saving 137ms.


Test

e2e/runfiles

⚠️ Buildkite build #9108 failed.


Test

e2e/vendored_node

⚠️ Buildkite build #9108 failed.


Buildifier


Format

MODULE.bazel Outdated
bazel_dep(name = "bazel_skylib", version = "1.5.0")
bazel_dep(name = "platforms", version = "0.0.5")
bazel_dep(name = "rules_nodejs", version = "6.3.0")
bazel_dep(name = "rules_nodejs", version = "6.5.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid changing the minimum version here and only update the tests?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

6.5.0 is the first version to introduce nodejs_windows_arm64 support. I'm not sure it's possible to add this without bumping the version in this file (see use_repo(node, "nodejs_windows_arm64") below). Or is there a way we could add this support without having to bump the version?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your repository requiring nodejs_windows_arm64 can declare whatever version you want, but I'd prefer avoiding forcing everyone to upgrade...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, I just tested without adding nodejs_windows_arm64 (as well as bumping the rules_nodejs version) and it indeed works fine.

I'm working on bringing Windows arm64 support to aspect-cli (draft PR here). The CI tests are failing with:

 Error in path: Unable to load package for @@[unknown repo 'yq_windows_arm64' requested from @@aspect_rules_js~]//:yq.exe: The repository '@@[unknown repo 'yq_windows_arm64' requested from @@aspect_rules_js~]' could not be resolved: No repository visible as '@yq_windows_arm64' from repository '@@aspect_rules_js~'

So just adding yq_windows_arm64 should be enough already. Just updated this PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A version bump on aspect_bazel_lib is actually required for yq_windows_arm64 support. Otherwise, CI fails with:

ERROR: module extension "toolchains" from "@@aspect_bazel_lib~//lib:extensions.bzl" does not generate repository "yq_windows_arm64", yet it is imported as "yq_windows_arm64" in the usage at /mnt/ephemeral/workdir/aspect-build/rules_js/MODULE.bazel:40:37 (did you mean 'yq_windows_amd64'?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the bazel_lib version bump is causing the tests to fail on Bazel 6.

I'm not sure how to proceed now. I'd love to get things to work by adding yq_windows_arm64, but looks like I'll need some support in getting that done. I'm not sure if Bazel 6 is still supposed to be supported, and I don't want to break things for folks. WDYT?

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

Successfully merging this pull request may close these issues.

2 participants