Skip to content

Add Firebase Source to Header Search Path #2114

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

Merged
merged 1 commit into from
Nov 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions Example/Firebase.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5023,7 +5023,6 @@
6003F5BD195388D20070C39A /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -5057,6 +5056,13 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(SRC_ROOT)/../Firebase/**",
"$(SRC_ROOT)/../Firestore/**",
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is valid. The Firebase project shouldn't be referring to any Firestore headers; certainly not any internal ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be noted that this isn't the core Firebase SDK. These were added so that the autocomplete in Xcode would work as expected in the tests, but given that there are no Firestore or Functions tests in this project, I do think they should be removed.

This comment also made the realize that developers might copy this project, which could lead to inadvertent use of internal headers, so the other search paths should only be added to test targets rather than the project as a whole.

Thanks for pointing this out! I made PR 2123 to revert this change. I'll follow up with a more limited version of this that only affects test targets and only includes headers that are used in those tests.

Copy link
Member

Choose a reason for hiding this comment

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

+1 for using specific header paths and avoiding recursive search paths.

"$(SRC_ROOT)/../Functions/**",
"$(SRC_ROOT)/../GoogleUtilities/**",
"$(SRC_ROOT)/../Interop/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
ONLY_ACTIVE_ARCH = YES;
Expand All @@ -5068,7 +5074,6 @@
6003F5BE195388D20070C39A /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand All @@ -5095,6 +5100,13 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(SRC_ROOT)/../Firebase/**",
"$(SRC_ROOT)/../Firestore/**",
"$(SRC_ROOT)/../Functions/**",
"$(SRC_ROOT)/../GoogleUtilities/**",
"$(SRC_ROOT)/../Interop/**",
);
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
SDKROOT = iphoneos;
Expand Down