Skip to content
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

Fix namespace pollution on Windows #117

Merged

Conversation

mortbopet
Copy link
Contributor

As described in #116, the io.h file in this project conflicts with io.h of windows.

This fixes that (in the somewhat narrow compilation path that i'm exercising) by removing include/substrait/common from the include path, and instead relying on the (already existing) full include-path namespacing instead of relative includes of io.h.

@@ -21,8 +21,8 @@ add_dependencies(
target_include_directories(
substrait_io
INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../../include/substrait/common>
$<INSTALL_INTERFACE:include/substrait/common>)
$<BUILD_INTERFACE:${SUBSTRAIT_CPP_INCLUDE_DIR}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter is complaining here since the lines are so short. (It wants to use two lines instead of three.)

Copy link
Member

@EpsilonPrime EpsilonPrime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. I was wondering why the common stuff wasn't as accessible as I thought it should have been!

As described in substrait-io#116, the `io.h` file in this project conflicts with `io.h` of windows.

This fixes that (in the somewhat narrow compilation path that i'm exercising) by removing `include/substrait/common` from the include path, and instead relying on the (already existing) full include-path namespacing instead of relative includes of `io.h`.
@mortbopet mortbopet force-pushed the dev/mpetersen/io_namespace_pollution branch from f7e538f to bd445e8 Compare September 7, 2024 07:50
@EpsilonPrime EpsilonPrime merged commit 0376088 into substrait-io:main Sep 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants