Skip to content

Conversation

@Mivr
Copy link
Collaborator

@Mivr Mivr commented Jan 27, 2026

Bazel 8.x is not compatible with Windows at the moment due to: bazelbuild/bazel#26701.
This branch fixes some common Windows issues so that the bug formentioned can be observed at all.
Then it introduces a fix for Bazel 9.0.0+ where the needed attribute is present.

Bazel 8.x will not work with rules_js until the fix is backported.

For now this seems unlikely: bazelbuild/bazel#27607

Fixes: #2261

Changes are visible to end-users: no

Test plan

  • Covered by existing test cases

@CLAassistant
Copy link

CLAassistant commented Jan 27, 2026

CLA assistant check
All committers have signed the CLA.

@aspect-workflows
Copy link

aspect-workflows bot commented Jan 27, 2026

Bazel 7 (Test)

8 test targets passed

Targets
//js/private/test/image:assert_custom_layers_nomatch_test_package_store_1p_test [k8-fastbuild] 66ms
//js/private/test/image:assert_custom_owner_test_app_test [k8-fastbuild]                       49ms
//js/private/test/image:assert_custom_owner_test_package_store_1p_test [k8-fastbuild]          60ms
//js/private/test/image:assert_default_test_app_test [k8-fastbuild]                            75ms
//js/private/test/image:assert_default_test_package_store_1p_test [k8-fastbuild]               51ms
//js/private/test/image:assert_regex_edge_cases_test_app_test [k8-fastbuild]                   51ms
//js/private/test/image:assert_regex_edge_cases_test_package_store_1p_test [k8-fastbuild]      52ms
//js/private/test/image:checksum_test_test_test [k8-fastbuild]                                 64ms

Total test execution time was 468ms. 312 tests (97.5%) were fully cached saving 44s.


Bazel 8 (Test)

All tests were cache hits

278 tests (100.0%) were fully cached saving 37s.


Bazel 9 (Test)

All tests were cache hits

278 tests (100.0%) were fully cached saving 35s.


Bazel 7 (Test)

e2e/bzlmod

All tests were cache hits

5 tests (100.0%) were fully cached saving 634ms.


Bazel 8 (Test)

e2e/bzlmod

Waiting for runner...


Bazel 9 (Test)

e2e/bzlmod

Waiting for runner...


Bazel 7 (Test)

e2e/git_dep_metadata

All tests were cache hits

1 test (100.0%) was fully cached saving 30ms.


Bazel 8 (Test)

e2e/git_dep_metadata

Waiting for runner...


Bazel 9 (Test)

e2e/git_dep_metadata

Waiting for runner...


Bazel 7 (Test)

e2e/gyp_no_install_script

All tests were cache hits

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


Bazel 8 (Test)

e2e/gyp_no_install_script

Waiting for runner...


Bazel 9 (Test)

e2e/gyp_no_install_script

Waiting for runner...


Bazel 7 (Test)

e2e/js_binary_workspace

All tests were cache hits

1 test (100.0%) was fully cached saving 44ms.


Bazel 8 (Test)

e2e/js_binary_workspace

Waiting for runner...


Bazel 9 (Test)

e2e/js_binary_workspace

Waiting for runner...


Bazel 7 (Test)

e2e/js_image_oci

All tests were cache hits

1 test (100.0%) was fully cached saving 6s.


Bazel 7 (Test)

e2e/npm_link_package

All tests were cache hits

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


Bazel 8 (Test)

e2e/npm_link_package

Waiting for runner...


Bazel 9 (Test)

e2e/npm_link_package

Waiting for runner...


Bazel 7 (Test)

e2e/npm_link_package-esm

All tests were cache hits

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


Bazel 8 (Test)

e2e/npm_link_package-esm

Waiting for runner...


Bazel 9 (Test)

e2e/npm_link_package-esm

Waiting for runner...


Bazel 7 (Test)

e2e/npm_link_package-rerooted

All tests were cache hits

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


Bazel 8 (Test)

e2e/npm_link_package-rerooted

Waiting for runner...


Bazel 9 (Test)

e2e/npm_link_package-rerooted

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock

All tests were cache hits

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


Bazel 8 (Test)

e2e/npm_translate_lock

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_lock

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock_disable_hooks

All tests were cache hits

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


Bazel 8 (Test)

e2e/npm_translate_lock_disable_hooks

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_lock_disable_hooks

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock_empty

All tests were cache hits

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


Bazel 8 (Test)

e2e/npm_translate_lock_empty

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_lock_empty

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock_exclude_package_contents

All tests were cache hits

1 test (100.0%) was fully cached saving 33ms.


Bazel 8 (Test)

e2e/npm_translate_lock_exclude_package_contents

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_lock_exclude_package_contents

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock_multi

All tests were cache hits

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


Bazel 8 (Test)

e2e/npm_translate_lock_multi

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_lock_multi

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock_partial_clone

All tests were cache hits

1 test (100.0%) was fully cached saving 26ms.


Bazel 8 (Test)

e2e/npm_translate_lock_partial_clone

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_lock_partial_clone

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock_replace_packages

All tests were cache hits

4 tests (100.0%) were fully cached saving 393ms.


Bazel 8 (Test)

e2e/npm_translate_lock_replace_packages

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_lock_replace_packages

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_lock_subdir_patch

All tests were cache hits

1 test (100.0%) was fully cached saving 94ms.


Bazel 8 (Test)

e2e/npm_translate_lock_subdir_patch

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_lock_subdir_patch

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_package_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 25ms.


Bazel 8 (Test)

e2e/npm_translate_package_lock

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_package_lock

Waiting for runner...


Bazel 7 (Test)

e2e/npm_translate_yarn_lock

All tests were cache hits

1 test (100.0%) was fully cached saving 25ms.


Bazel 8 (Test)

e2e/npm_translate_yarn_lock

Waiting for runner...


Bazel 9 (Test)

e2e/npm_translate_yarn_lock

Waiting for runner...


Bazel 7 (Test)

e2e/package_json_module

All tests were cache hits

1 test (100.0%) was fully cached saving 224ms.


Bazel 8 (Test)

e2e/package_json_module

Waiting for runner...


Bazel 9 (Test)

e2e/package_json_module

Waiting for runner...


Bazel 7 (Test)

e2e/patch_from_repo

All tests were cache hits

1 test (100.0%) was fully cached saving 25ms.


Bazel 7 (Test)

e2e/pnpm_lockfiles

All tests were cache hits

37 tests (100.0%) were fully cached saving 4s.


Bazel 8 (Test)

e2e/pnpm_lockfiles

Waiting for runner...


Bazel 9 (Test)

e2e/pnpm_lockfiles

Waiting for runner...


Bazel 7 (Test)

e2e/pnpm_repo_install

All tests were cache hits

1 test (100.0%) was fully cached saving 840ms.


Bazel 8 (Test)

e2e/pnpm_repo_install

Waiting for runner...


Bazel 9 (Test)

e2e/pnpm_repo_install

Waiting for runner...


Bazel 7 (Test)

e2e/pnpm_version

All tests were cache hits

1 test (100.0%) was fully cached saving 56ms.


Bazel 8 (Test)

e2e/pnpm_version

Waiting for runner...


Bazel 9 (Test)

e2e/pnpm_version

Waiting for runner...


Bazel 7 (Test)

e2e/pnpm_workspace

All tests were cache hits

15 tests (100.0%) were fully cached saving 3s.


Bazel 8 (Test)

e2e/pnpm_workspace

Waiting for runner...


Bazel 9 (Test)

e2e/pnpm_workspace

Waiting for runner...


Bazel 7 (Test)

e2e/pnpm_workspace_deps

All tests were cache hits

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


Bazel 8 (Test)

e2e/pnpm_workspace_deps

Waiting for runner...


Bazel 9 (Test)

e2e/pnpm_workspace_deps

Waiting for runner...


Bazel 7 (Test)

e2e/pnpm_workspace_rerooted

All tests were cache hits

15 tests (100.0%) were fully cached saving 2s.


Bazel 8 (Test)

e2e/pnpm_workspace_rerooted

Waiting for runner...


Bazel 9 (Test)

e2e/pnpm_workspace_rerooted

Waiting for runner...


Bazel 7 (Test)

e2e/repo_mapping

All tests were cache hits

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


Bazel 8 (Test)

e2e/repo_mapping

Waiting for runner...


Bazel 9 (Test)

e2e/repo_mapping

Waiting for runner...


Bazel 7 (Test)

e2e/runfiles

All tests were cache hits

1 test (100.0%) was fully cached saving 179ms.


Bazel 8 (Test)

e2e/runfiles

Waiting for runner...


Bazel 9 (Test)

e2e/runfiles

Waiting for runner...


Bazel 7 (Test)

e2e/stamped_package_json

All tests were cache hits

1 test (100.0%) was fully cached saving 48ms.


Bazel 8 (Test)

e2e/stamped_package_json

Waiting for runner...


Bazel 9 (Test)

e2e/stamped_package_json

Waiting for runner...


Bazel 7 (Test)

e2e/vendored_node

All tests were cache hits

1 test (100.0%) was fully cached saving 126ms.


Bazel 8 (Test)

e2e/vendored_node

Waiting for runner...


Bazel 9 (Test)

e2e/vendored_node

Waiting for runner...


Bazel 7 (Test)

e2e/vendored_tarfile

All tests were cache hits

1 test (100.0%) was fully cached saving 25ms.


Bazel 8 (Test)

e2e/vendored_tarfile

Waiting for runner...


Bazel 9 (Test)

e2e/vendored_tarfile

Waiting for runner...


Bazel 7 (Test)

e2e/verify_patches

All tests were cache hits

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


Bazel 8 (Test)

e2e/verify_patches

Waiting for runner...


Bazel 9 (Test)

e2e/verify_patches

Waiting for runner...


Bazel 7 (Test)

e2e/worker

All tests were cache hits

1 test (100.0%) was fully cached saving 75ms.


Bazel 8 (Test)

e2e/worker

Waiting for runner...


Bazel 9 (Test)

e2e/worker

Waiting for runner...


Buildifier      Format

// When running under test, files should be in runfiles.
// This package may also be used as a run_binary(tool) and not in a test.
if (process.env.TEST_WORKSPACE) {
// On Windows, Node.js resolves junctions to their real path so __filename
Copy link
Member

Choose a reason for hiding this comment

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

Is that a fs-patch bug? Why does that only happen on windows? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not an fs-patch bug. Node.js on Windows resolves junctions (directory symlinks) to their real path when returning __filename. This is expected Windows junction behavior.

Copy link
Member

Choose a reason for hiding this comment

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

I mean... that is a bug. I'm just not sure if we can ever fix it?

@jbedard
Copy link
Member

jbedard commented Jan 29, 2026

@Mivr can we fix the failing tests as well?

…files

- Rename _make_symlink to _make_directory_symlink since it's only used
  for directory symlinks (npm package store)
- Update callers in npm_package_store.bzl and npm_link_package_store.bzl
- Regenerate image test golden files (file sizes changed due to Windows
  sandbox compatibility changes in index.js)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
name,
)
symlink = ctx.actions.declare_symlink(store_symlink_path)
ctx.actions.symlink(
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if there's a reason this doesn't use the util method? Should we change this to make_directory_symlink?

Copy link
Member

Choose a reason for hiding this comment

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

If we use the util method then utils won't have to expose supports_symlink_target_type?

def _make_symlink(ctx, symlink_path, target_path):
def _make_directory_symlink(ctx, symlink_path, target_path):
symlink = ctx.actions.declare_symlink(symlink_path)
ctx.actions.symlink(
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 keep the 2 params like before and only add **_symlinksTypeArgs to the end? Also make _symlinksTypeArgs a global (replace _SUPPORTS_SYMLINK_TARGET_TYPE) so we aren't constructing it 100% of the time?

Copy link
Member

Choose a reason for hiding this comment

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

Or just if/else and each can hardcode it's args without any **

@alexeagle
Copy link
Member

Replaces #2325?

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.

[Bug]: bazel test //examples/npm_deps:test10 fails on windows with bazel 8+

5 participants