When building/testing the external_archive_test target Bazel produces the following output (line numbers omitted):
rules_pkg_test/BUILD: no such package 'pkg': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
- ~/rules_pkg_test/pkg and referenced by '//:external_archive_test'
It appears the verify_archive_test macro is evaluating "//pkg:verify_archive_test_lib" inside the caller's BUILD context instead of within rules_pkg.
In experimenting with the new
verify_archive_test
macro I noticed using it outside ofrules_pkg
itself would lead to a loading error.Example
rules_pkg_test/BUILD
:When building/testing the
external_archive_test
target Bazel produces the following output (line numbers omitted):It appears the
verify_archive_test
macro is evaluating"//pkg:verify_archive_test_lib"
inside the caller's BUILD context instead of withinrules_pkg
.