-
Notifications
You must be signed in to change notification settings - Fork 10
readme.md #34
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
base: main
Are you sure you want to change the base?
readme.md #34
Conversation
|
|
||
| ## Purpose | ||
|
|
||
| The goal of `rules_shell` is to make working with shell scripts in Bazel more robust and reproducible, similar to how Bazel handles other languages like Go (`rules_go`) or Python (`rules_python`). |
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.
Thanks for taking a stab at this, but I fear that we don't really live up to this promise just yet. This ruleset is more or less a faithful port of the formerly native shell rules, it's not (yet) more robust or reproducible.
There is an active proposal for integrating ctx.actions.run_shell with rules_shell as well as providing a PATH of hermetic shell tools. I would like to wait for that to be implemented before we claim this.
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.
Is there any README.md that you'd be able to add to give some indication to how rules_shell is supposed to be used?
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.
@filmil
Thanks for your response
Sorry I'm not sure who you are asking
In general, this merge request was mostly intended to highlight that rules_shell isn't well documented. In particular, it is unclear [at least to a fool like me] what rules_shell is intending to achieve.
I strongly suspect that that team who wrote rules_shell did have a clear intent and do understand what rules_shell all about. - It would really help others to document this even minimally. It might even help the experts who do understand to stay on track :)
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.
The question was for @fmeum . It would be nice if a maintainer would bootstrap a README.md with main points to know about the rule set.
| name = "hello", | ||
| srcs = ["hello.sh"], | ||
| data = [":greeting.txt"], | ||
| deps = ["@bash//:bin/bash"], |
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.
I don't think this could be realized as the script needs some shebang that would run first. If we want it to be truly hermetic, we would need to involve a launcher binary, a simple dep wouldn't help.
| Please note that rules_shell depends on bash outside of the Bazel sandbox | ||
|
|
||
| ``` | ||
| _DEFAULT_SHELL_PATHS = { |
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.
We should mention that these are the default paths, but that you can register your own toolchains and/or set BAZEL_SH.
No description provided.