You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handle files from external repos (fix breaking change in Bazel 3.7.0) (#2138)
Fixes#1780
In Bazel 3.7.0, the path returned by `build_file_path` changed
(bazelbuild/bazel#12344), it no longer
contains the `external/<repo>` prefix for external files. This breaks
the expectations of this rule in the [`paths.relativize`
function](https://github.com/bazelbuild/bazel-skylib/blob/main/docs/paths_doc.md#pathsrelativize)
call.
In this PR I prepend the `workspace_root` (`external/<repo>`) to
`build_file_path` (`<path/in/the/repo>`), and use `path`
(`external/<repo>/path/in/the/repo`) instead of `short_path`
(`../<repo>/path/in/the/repo`).
For files that are generated in different configurations I need to strip
the `root` which contains the
`bazel-out/darwin-fastbuild-ST-a1a0f4088294/bin/` that will never appear
in the `package_root` path.
~Note.- I will probably need some help to add tests for this change~
I've tried to add one test
---------
Co-authored-by: UebelAndre <github@uebelandre.com>
0 commit comments