Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[7.7.1] Windows CI builds failing with "expected an absolute Windows path for junction_target" #28406

@mbland

Description

@mbland

Originally reported as bazelbuild/continuous-integration#2445, as this seems to be due to an infrastructure change. Please see that issue for more details.

Reporting here in case the proper approach is to update the local_repository implementation.

ERROR: <builtin>: fetching local_repository rule //:rules_scala+:
  java.io.IOException: Could not create symlink to repository
  "/c/b/bk-windows-8slj/bazel/rules-scala-scala/tmp/test_bzlmod_macros"
  (absolute path: "/c/b/bk-windows-8slj/bazel/rules-scala-scala/tmp/test_bzlmod_macros"):
Cannot create junction
  (name=C:\tools\msys64\home\b\_bazel_b\jto5y4qq\external\rules_scala+,
   target=\c\b\bk-windows-8slj\bazel\rules-scala-scala\tmp\test_bzlmod_macros):
ERROR: src/main/native/windows/file-jni.cc(122):
  nativeCreateJunction(\\?\C:\tools\msys64\home\b\_bazel_b\jto5y4qq\external\rules_scala+,
    \\?\\c\b\bk-windows-8slj\bazel\rules-scala-scala\tmp\test_bzlmod_macros):
ERROR: src/main/native/windows/file.cc(231):
  CreateJunction(\\?\\c\b\bk-windows-8slj\bazel\rules-scala-scala\tmp\test_bzlmod_macros):
expected an absolute Windows path for junction_target

I've only seen this with Bazel 7.7.1 so far. All of the native Windows code in the vicinity of the error path seems quite old, even on master, and local_repository has only changed to add a rctx.watch call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions