google/asylo

`asylo_package` bazel path builder breaks when external repository uses `asylo` in its name

blaxill opened this issue · 1 comments

The asylo_package helper function currently just checks if asylo is in the path and so breaks when external repository uses asylo in its name:

def asylo_package():
"""Returns an appropriate-to-caller package name for Asylo."""
return "//asylo" if "asylo" in native.package_name() else "@com_google_asylo//asylo"

For example compiling in an external repository: bazel build //oak/server/asylo:xxxx fails with no such package 'asylo/bazel/application_wrapper'.

This was a workaround for the --incompatible_remap_main_repo flag that still hasn't flipped in Bazel. I'll change it to .startswith("asylo") and hopefully that will be good enough until the flag is flipped. Thanks for the report!