crosses boundary of subpackage 'external'
If there is a dir named "external" in your workspace root, bazel complains with
Label '//:external/foobar.h' crosses boundary of subpackage 'external' (perhaps you meant to put the colon here: '//external:foobar.h'?).
Maybe it's silly to have a dir named "external", but I'm modifying a 3rd party SDK to work with bazel and they have a directory named external.
With a simple "hello world" test project, I was able to reproduce:
mkdir external
cd external
touch foobar.h
bazel build :hello
ERROR: /Users/jeremyhale/work/bazel_arm_none/BUILD:3:12: Label '//:external/foobar.h' crosses boundary of subpackage 'external' (perhaps you meant to put the colon here: '//external:foobar.h'?).
ERROR: error loading package '': Package '' contains errors.
Environment info
-
Operating System: Darwin Jeremys-MacBook.local 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
-
Bazel version (output of
bazel info release): release 0.4.4-homebrew
I'm actually surprised you're getting this far. We should have a clearer error message here, but you cannot have a directory named "external." It simply will be ignored by Bazel, because the //external package is handled differently.
Could you put the project deeper? E.g., //third_party/your_sdk/external should work fine.
This is another point in favor of getting rid of bind() (#1952), we wouldn't actually need to reserve //external without it.
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.