-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
There seem to be no easy way of getting location of the artifacts built by bazel, which results in a lot of unnecessary complexity and potentially faulty assumptions in tooling that needs to access build artifacts.
Most difficulties arise from the fact that bazel adds various sub-folders in the output such as "external", "$platform_$arch_[stripped|opt]", "$target_name.runfiles", etc. which requires any tooling that needs to be able to find the location know information about the build target, environment and all bazel layout conventions.
Buck solved this problem by introducing buck targets --show-output command that prints location of each build target in the build output folder.
For example:
buck targets --show-output //java/com/myproject:binary
> //java/com/myproject:binary buck-out/gen/java/com/myproject/binary.apk
The only potential work-around that I was able to find was using bazel aquery as described here but it's not easy to use.
It would be nice to have equivalent in bazel, is there anything that prevents us from exposing this information as part of bazel query command?
Can we have bazel query mytarget --show-output or other simple equivalent?