Replies: 2 comments 1 reply
-
This is nice and would help with some edge cases we currently work around with by just not letting the plugin generate the build file. Would this replace the option that exists today to allow patching a package? It may not be needed if we have this |
Beta Was this translation helpful? Give feedback.
-
TIL about the existing patching mechanism, thanks for mentioning it! I think the proposed However, the |
Beta Was this translation helpful? Give feedback.
-
Problem
Occasionally, a client tries to use a Swift package and the generated Bazel targets are not quite right or broken. Today, the client submits a bug report and someone updates
rules_swift_package_manager
to fix the issue. The problem is that the cycle for the fix can be long.Note
We still want the bug report, if a client runs into a problem. The goal is to provide a way for the client to work around the issue.
Proposal
Create a mechanism by which a client can specify a target and apply fixes in much the same way as buildozer. In fact, we should use
buildozer
wherever we can.The mechanism needs a selector syntax and a modification syntax.
buildozer
already has these. 🥳 For the purposes of this discussion, I believe that the modification syntax should be whateverbuildozer
supports. Unfortunately, we may need to augment the selector syntax as we need to support third-party repository labels or something that approximates them.Usage
Other Options
Use patches
This would work but is fairly brittle. Any changes to how
rules_swift_package_manager
generates the underlying code could break client's patches.Conclusion
Let me know what you think. Do you like the idea? How would you want it to work?
Beta Was this translation helpful? Give feedback.
All reactions