-
Notifications
You must be signed in to change notification settings - Fork 455
CDRIVER-5866 Fix 2 includes #1836
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
Hi @jeroen, thanks for contributing a patch to mongodb! I'm taking a look at this and while I agree the switch to quoted headers from angled might be an improvement, I'm not sure why the issue is coming up for you in these specific instances. In general there's a lot of inconsistency between header quoting styles, and this codebase assumes that header paths during compilation include the project source directories. My assessment so far is that this would be best fixed at the build system level. A source level fix to change the header include style might be welcome but I suspect it would need to be more comprehensive in order to have its intended effect. Could you share some more information about the build steps prior to the clang lines you've posted? |
I maintain the R bindings and we vendor mongo-c-driver. We have a custom makefile so this might explain some subtle differences with your cmake config. What makes the above lines a bug is that they use angled bracket notation but the path is not prefixed with So you could either switch them to |
Thank you for reporting @jeroen. Filed CDRIVER-5865 to apply a consistent include pattern in the codebase.
I would rather this PR be updated to use this form to avoid relative look-up. |
@kevinAlbs it's fine by me but literally all other mongoc headers in this file use quotes so for consistency that seems to make more sense? The last line below is the only odd one out... mongo-c-driver/src/libmongoc/src/mongoc/mongoc-init.c Lines 18 to 55 in 69d04ae
|
The problem is really larger than just a couple files. We have a more comprehensive solution in progress. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CDRIVER-5670 is expected to address this to the entire codebase. LGTM as a short-term fix (though it may be overwritten shortly).
This fixes two complication errors:
and