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

Guidance on tool authoring #57

Closed
sengelha opened this issue Apr 4, 2023 · 1 comment · Fixed by #117
Closed

Guidance on tool authoring #57

sengelha opened this issue Apr 4, 2023 · 1 comment · Fixed by #117

Comments

@sengelha
Copy link

sengelha commented Apr 4, 2023

Many languages require building and using supplementary tools, like @io_bazel_rules_go's use of a builder tool. Is there guidance on the "right" way to author tools which are used by this rules-template, and hook them up to the ruleset? What about if mylang is not an appropriate language in which to author these tools?

In the past, I've written these tools as:

  1. sh_binary()s, which doesn't work out of the box on Windows particularly well, and often depends on other system tools
  2. py_binary()s, which don't work well in Bazel remote build scenarios, particularly when using python3 and third-party pip libraries
  3. go_binary()s, which end up polluting my rulesets with external references to @io_bazel_rules_go
@alexeagle
Copy link
Contributor

Yes, I wrote this up in https://blog.aspect.build/releasing-bazel-rulesets-rust
and you can see aspect-build/rules_py and aspect-build/bazel_lib are examples.

I'll add to docs here.

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

Successfully merging a pull request may close this issue.

2 participants