Stop leaking internal headers to other libraries. - #729
Conversation
This is important for e.g. glib/gio, which also has an internal config.h, and fails to compile, as it often picks up the pcre2 config.h first.
|
@NWilson Can you please have a look? Thanks a lot! |
|
Interesting. I see the issue. I don't know Bazel at all, but I can see that it's documented for the From a little bit of Googling, I'm concerned about:
|
|
Thanks for looking into this!
I've seen it in quite a few bazel projects and MSVC according to https://learn.microsoft.com/en-us/cpp/build/reference/compiler-option allows both
I changed it to use an impl library which is solely for internal use. Please take another look! |
|
I have pushed a commit to your branch, which is my attempt to make the diff a bit smaller, by only pulling out the headers into their own internal dependency. I am able to run the I don't know enough about Bazel to confirm whether or not your original issue is fixed however (the public export of config.h to downstream clients). |
|
Also @feuerste, if you're a Bazel user, do you know if it's OK now to remove the WORKSPACE.bazel file? I think this is some old compatibility thing for Bazel <6.3 (according to the docs), and those versions are now out of support I believe. |
I just tested it locally with all my dependencies, and it still works, so from my side we can merge it. |
I'm pretty sure we can remove that file, probably in a separate PR? |
Thank you very much! I'll merge. I'll open a separate PR for removing WORKSPACE.bazel. |
This is important for e.g. glib/gio, which also
has an internal config.h, and fails to compile, as it often picks up the pcre2 config.h first.