-
Notifications
You must be signed in to change notification settings - Fork 31
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: correct issues with modulemap generation #1360
base: main
Are you sure you want to change the base?
Conversation
3c0f64c
to
51f6d2c
Compare
@@ -435,7 +438,7 @@ def _clang_target_build_file(repository_ctx, pkg_ctx, target): | |||
noop_modulemap = clang_src_info.modulemap_path != None | |||
modulemap_attrs = { | |||
"deps": bzl_selects.to_starlark(modulemap_deps), | |||
"hdrs": clang_src_info.hdrs, | |||
"hdrs": [] if noop_modulemap else clang_src_info.hdrs, |
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.
Not needed but noticed we were adding all the hdrs
/deps
here even in the noop case which was confusing when looking at the build file
51f6d2c
to
5c2019d
Compare
5c2019d
to
59e0969
Compare
We should use an aspect hint instead (both for the empty case and the supplied case): https://github.com/bazelbuild/rules_swift/blob/61e2c46dbfac6b9c11ecfb2c8e92f3e157ea9f27/swift/swift_clang_module_aspect.bzl#L221 |
hmm, this doesn't seem to work. I believe because its failing during the I've tried setting the child |
59e0969
to
dc399d5
Compare
@brentleyjones I did update this to generate a |
b5e7a42
to
eab4c6d
Compare
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.
Can you remove these lines from the firebase example and ensure that it works? Also, can you remove this section from the FAQ?
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.
Thank you for implementing this! I have a few suggested changes. Otherwise, LGTM.
eab4c6d
to
20e3bb9
Compare
Updated, |
Fixes duplicate definition errors caused by custom/generated modulemap files.