Skip to content
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

Expressing custom module hierarchies / architectures with Bazel #585

Open
jerrymarino opened this issue Nov 2, 2022 · 0 comments
Open

Comments

@jerrymarino
Copy link
Contributor

jerrymarino commented Nov 2, 2022

I'd like to know the tradeoffs and ways to get other kinds of rules composing together a rules_ios build graph. Today the common primitive is apple_framework - and they are setup to be dependent on one another.

Consider a package which has an interface module and a sibling Bindings. Bindings are linked deps ( e.g. in the final executable ) and injected at the top of the tree - they are not to be depended by most of the tree. Without support in the build system, today I'd need to add significant amounts of redundant labels and have unmaintainable build files.

To remdiate this - I thought to join them together into a higher order a "bound_module" rule so I can propagate or collect all Bindings further up the tree:

bound_module = rule(
   interface = ":Interface",
   bindings = ":Bindings"
   # Other idioms here
)

You can of course pull something like this off in starlark - but ideally we harden everything to deal with this. Perhaps with such hardening we can support it end to end in project generation and testing without requiring a user to explicitly deal with todays providers or related code. On the other hand, it might be nice to codify such "glue" rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant