Pass imported swiftmodules to ld with -add_ast_path flag#567
Pass imported swiftmodules to ld with -add_ast_path flag#567swiple-rules-gardener merged 17 commits intobazelbuild:masterfrom
Conversation
|
I assume support needs to be added for |
222c7fb to
55c9a6d
Compare
|
I've rebased and modified on top of #566. |
|
ade4c89 to
ecca975
Compare
|
I changed approach slightly. Instead of implementing this logic all inline, I duplicated the interfaces from rules_swift that we'd like to ultimately reuse, and customized them for this case. This makes the callsite cleaner, and makes future migration – should those APIs become public, easier. It also calls out explicitly that this behavior is duplicated, as a reminder that hopefully one day we can reuse this behavior from rules_swift. |
|
I'm ok with supporting only the legacy behavior for now. If adding a test is not too complex, could you add one? |
|
Yep, was intending to add tests. Will do that now. |
|
@sergiocampama I'm considering making a patch for this locally, but I wanted to check if you had any additional feedback. |
|
also, could you rebase as well? there are some changes that fix the buildifier check |
|
Thanks for the review. |
818dc37 to
9eb87ac
Compare
|
Fixed |
|
Do you want me to rebase again? |
992495e to
ffd6158
Compare
|
Rebased. |
ffd6158 to
ba8ea6f
Compare
Having a prebuilt .swiftmodule file in there isn't going to work; it version-locks the test to a specific version of Xcode, and makes it impossible for Buildkite to update Xcode without breaking the test. It also means we can't have Buildkite and Google's internal CI running different versions of Xcode, which is a non-starter. (And this is why I'm nervous about this whole feature to begin with.) I don't have a great answer for this. Since you actually need it to be a valid module (because you're building code that depends on it), you can't just have it be a dummy file. @thomasvl, do you have any ideas? |
|
For what it's worth, master already is in this state. I could look to generate these fixtures pre- test. |
|
Ah, so it is... from the diff on the files changed page I couldn't tell if it was being added or just 100% changed. I wonder if you could do this as two phases in the test. First, have a |
|
Sounds good |
Add customized local implementations of needed rules_swift functionality.
20004bf to
469a65e
Compare
|
Also rebased. |
allevato
left a comment
There was a problem hiding this comment.
I think we're good to go now!
|
Thanks for helping us get this shaped up :) |
PiperOrigin-RevId: 279111959
When using imported swift frameworks, and when building
dbg, pass the.swiftmodulefiles to the linker using the-add_ast_path. This enables lldb expression evaluation using such modules.