-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bazel can't exclude directories #1083
Comments
Looks like protobuf has the same problem: once I remove
where |
See if this helps: #829 2016-03-24 13:18 GMT-04:00 Geoffrey Irving notifications@github.com:
|
It doesn't seem to. Both of these commands still produce errors:
|
I'm using Bazel release 0.2 and --deleted_packages seems to work fine for $ mkdir test $ cd test $ touch WORKSAPCE BUILD $ mkdir broken $ echo "what" > broken/BUILD $ bazel build ... ERROR: /Users/alpha/Projects/test/broken/BUILD:1:1: name 'what' is not ERROR: package contains errors: broken. ERROR: no such package 'broken': Package 'broken' contains errors. INFO: Elapsed time: 0.138s $ bazel build ... --deleted_packages broken INFO: Found 0 targets... INFO: Elapsed time: 0.811s, Critical Path: 0.00s 2016-03-25 10:41 GMT-04:00 Geoffrey Irving notifications@github.com:
|
|
Bazel doesn't provide a way to exclude scanning directories in project root: [1]. Add workaround, by teaching Eclipse to exclude BUILD file instead. With this workaround in place Eclipse and Bazel build can co-exist: $ tools/eclipse/project.py # generates .classpath and other files # Start Eclipse and rebuild gerrit, eclipse-out is created $ bazel test ... # works as expected now [1] bazelbuild/bazel#1083 Change-Id: I7e767d0768af8bba3acc84d5fc242cab0e9abfdb
I am currently running into this problem, because I depend on the node package grpc containing BUILD files. |
I am currently running into the problem also. We have a mono-repository with an So we can easily separate stuff that is well, experimental, does not have to be tested necessarily and should not be used outside of that folder and not get auto-deployed either or any other way interfere with any of our tooling. But you still want version control for this code and it may or may not move out of experimental at some stage. I do not see how such a thing is currently possible without having a potentially huge |
Some progress on this, with a Further the Having something along the lines of #4888 (comment) would work better. Or if it should still go into the |
We make heavy use of the |
Can this be closed? See #4888 |
@dpursehouse yes. This feature is now available with |
According to https://groups.google.com/forum/#!topic/bazel-discuss/KBfaySoVEFs bazel has no way to exclude directories from the search for BUILD files. In the case of TensorFlow, the instructions for setting up bazel for Python development call for creating a
_python_build
file at the top level with a bunch of symlinks to other directories: https://www.tensorflow.org/versions/r0.7/get_started/os_setup.html#setting-up-tensorflow-for-developmentBazel then chokes whenever I try to build from the top level, since the symlinks point to directories with BUILD files. The
_python_build
directory is supposed to be purely for Python's benefit, so bazel should just ignore it.This is mainly a feature request for ignoring a directory, but I'd also appreciate any suggestions for dodging around this limitation in bazel in the short term.
The text was updated successfully, but these errors were encountered: