-
Notifications
You must be signed in to change notification settings - Fork 90
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
Set xcode target build settings, so xcode indexer will work #90
Conversation
rules/xcodeproj.bzl
Outdated
if fi[0] != '/': | ||
fi = "$BAZEL_WORKSPACE_ROOT/%s" % fi | ||
other_cflags.append("-F%s" % fi) | ||
other_cflags.extend(["-D%s" % di for di in target[CcInfo].compilation_context.defines.to_list()]) |
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.
do we also want to pull out defines from the SwiftInfo
provider to pass to to SWIFT_ACTIVE_COMPILATION_CONDITIONS
? What about paths to swiftmodules for non-framework deps (such as a test that will try to import its test host)?
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.
Looks good! Will need the fixture projects updated & buildifier run to pass CI.
Is there a project in the repo we can run that demonstrates that indexing is fixed with this change?
rules/xcodeproj.bzl
Outdated
"path": paths.join(src_dot_dots, s.short_path), | ||
"group": paths.dirname(s.short_path), | ||
"optional": True, | ||
"compilerFlags": "-fobjc-no-arc", # TODO: why is this not working |
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.
probably because the flag is -fno-objc-arc
… will succeed. If xcode indexer fails, autocomplete operations will not work.
972ff6f
to
564db51
Compare
If xcode indexer fails, autocomplete operations will not work.