Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes rules_perl work with
--experimental_sibling_repository_layout
The reason it did not work was that the code assumed that the execpath of any artifact can be passed to `ctx.actions.declare_file()`, but that's not the case for artifacts not in the main repository when sibling repository layout is in effect: their paths start with `../` which would make them ascend above the package directory. This also triggered a bug in Bazel (bazelbuild/bazel#22362), but even if that bug didn't exist, this would still not work. Serendipitously, the principled fix for `--experimental_sibling_repository_layout` is also a workaround for the above bug. It adds two path segments to the package-relative path of the .o file, akin to how c++ rules work.
- Loading branch information