Re: --experimental_sibling_repository_layout

49 views
Skip to first unread message

Lukács T. Berki

unread,
Oct 14, 2022, 4:06:45 AM10/14/22
to Fabian Meumertzheim, Jaewoong Jung, bazel-discuss
Good question!

(Adding Jaewoong in case his memories are sharper; mine are quite hazy)

The "other_repo/bazel-out/k8-fastbuild/bin" option was considered (see this doc), but IIRC we ended up with the current approach simply because it solved our little problem at the moment (which was having a directory called "external/" in AOSP) and it was less work. Also, since it's an --experimental_* flag, we thought it was acceptable not to be 100% principled.

I do think that if that flag is ever to be flipped, we should take a second look at the location of "bazel-out" for the exact reason you mention. We do have some clashes that are unavoidable (e.g. we can't have a source directory called "bazel-out") but I'd rather we have as few of them as possible and it would be nice to treat the main repository symmetrically with all the others, which is not true at the moment.


On Thu, Oct 13, 2022 at 3:26 PM Fabian Meumertzheim <fab...@meumertzhe.im> wrote:
Hi Lukács,

While working on the runfiles libraries changes required for Bzlmod, I also tried to understand --experimental_sibling_repository_layout a bit better. There is one aspect that still confuses me though.

Say the build consists of the unnamed main repository and an external repository "other_repo", each with a source ("source.txt") and a generated file ("gen.txt") in the pkg "pkg". Based on my experiments, with --experimental_sibling_repository_layout these files would have the following locations relative to the output base:

__main__/pkg/source.txt
__main__/bazel-out/k8-fastbuild/bin/pkg/gen.txt
other_repo/pkg/source.txt
__main__/bazel-out/other_repo/k8-fastbuild/bin/pkg/gen.txt

I would have expected the last path to instead be the following:
other_repo/bazel-out/k8-fastbuild/bin/pkg/gen.txt

Could you explain why `bazel-out` is still planted under the main repository? Doesn't that potentially lead to clashes if someone calls a repo `k8-fastbuild` or `volatile-status.txt`?

Best,
Fabian


--
Lukács T. Berki | Software Engineer | lbe...@google.com | 

Google Germany GmbH | Erika-Mann-Str. 33  | 80636 München | Germany | Geschäftsführer: Paul Manicle, Halimah DeLaine Prado | Registergericht und -nummer: Hamburg, HRB 86891
Reply all
Reply to author
Forward
0 new messages