-
Notifications
You must be signed in to change notification settings - Fork 857
Hide config.h from rules that use gflags #234
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
Conversation
|
Don't merge this as is - it breaks the build when included from external workspaces, since |
|
Hm, it was always intended to be hidden from dependent projects (see for example this change). I guess it is unclear which directories Bazel automatically adds to a dependent projects include path though these are not specified by the project as part of the public interface. At least I don't agree that Bazel should add Looking back at this previous PR that intended to fix the same, I am wondering if because of Are you more familiar how Bazel manages include paths and separation of public and private header files? Or know where it is documented? (... just got the don't merge yet message...) |
|
Are |
|
I've added a messy fix, but let's ask bazel-discuss@ if there's a better way. The understanding that I have comes from Header inclusion checking, where it says:
and
So I think Bazel can't easily detect this - it has to add the problematic |
|
Have you had a look at |
|
I haven't tried using |
|
Just tried adding: to see if it would make config.h inaccessible, but no luck - it results in:
|
|
I feel Bazel's automatic addition of unwanted paths to the include path of an external project and the inability to mark outputs of a |
Yes, I've played with it myself now to see what it does. Interestingly, even though the |
|
@drigz Thanks for bringing up the issue and providing a solution. I've merged the PR that instead avoids a |
This commit addresses a few issues:
1. No longer leak config.h in a way similar to
gflags/gflags#233
The solution of prefixing the path by 'glog_internal' is modified from
gflags/gflags#234
2. No longer expose internal headers.
3. Replace PACKAGE_NAME with native.package_name()
4. Uers can choose namespaces via the newly added 'namespace' keyword.
5. Replace glob with explicitly listing of files.
6. Make the genrules more compact using pythonic list construction.
This commit addresses a few issues:
1. No longer leak config.h in a way similar to
gflags/gflags#233
The solution of prefixing the path by 'glog_internal' is modified from
gflags/gflags#234
2. No longer expose internal headers.
3. Replace PACKAGE_NAME with native.package_name()
4. Uers can choose namespaces via the newly added 'namespace' keyword.
5. Replace glob with explicitly listing of files.
6. Make the genrules more compact using pythonic list construction.
This commit addresses a few issues:
1. No longer leak config.h in a way similar to
gflags/gflags#233
The solution of prefixing the path by 'glog_internal' is modified from
gflags/gflags#234
2. No longer expose internal headers.
3. Replace PACKAGE_NAME with native.package_name()
4. Uers can choose namespaces via the newly added 'namespace' keyword.
5. Replace glob with explicitly listing of files.
6. Make the genrules more compact using pythonic list construction.
Fixes #233. This should be safe because config.h is only included from .cc files (and from .h files that are in turn included from .cc files).