Also, I looked at the buildpacks-ci repo you linked, and it still has ~2000 lines of shell in ~80 files.
For comparison, there's ~12,500 lines of Ruby.
Another issue I have is that if Kubernetes replaces its 44,000 lines of shell with 100,000 lines of Go (or probably more), that's a mixed result at best. There's just a lot of logic to express and shell does it concisely.
Of course, without a better shell, I don't blame them if they switch, but it's still a suboptimal state of affairs.
I agree bash is not a sane production language, and apparently so does Greg Wooledge, somebody who has maintained a popular bash FAQ for a very long time. I quoted him in my latest release announcment:
I did hear about Cloud Foundry moving from shell to Go for some things, and I also heard that Kubernetes was rewriting a lot of its shell. [1]
(1) If you had to choose between Go and bash, I can understand choosing Go. I saw some blog posts along those lines [2].
Although I don't think it's optimal. I'd be interested in seeing some of those "shell scripts in Go" if you have a link. There should be a better language for sane shell scripting (hence Oil).
(2) I imagine it's not fun to port thousands of lines of shell to Go (or Ruby) by hand. Oil is supposed to help with that via an approximate translation and good errors, but that part isn't done yet.
What IS close to done is a dialect of bash that is sane -- or CAN BE MADE sane with user feedback.
For example, in the latest release I added set -o strict-argv, and there's also set -o strict-control-flow and strict-word-eval. I will add a strict-ALL to opt into all at once, as mentioned in the release notes.
Also, OSH gives you all your parse errors at once, rather than having them blow up at runtime later:
[1] I just pulled the Kubernetes and there's 44K lines in *.sh files, as opposed to 48K lines a couple years ago. If it were proportional to the project's growth, I would have expected it to be 100K lines by now, so it seems they are indeed getting rid of shell!
However this only removes ONE LAYER of shell. Any cloud service that uses a Linux distro (which is all of them) is papering over all the nasty layers of shell underneath! I hope that Linux distros will gradually move to Oil to get rid of this legacy.
Cloud Foundry Buildpacks were rewritten in Go and the (quite elaborate) automation for manufacturing them[0] is mostly test-driven Ruby these days.
I can't claim credit for the former but I had a hand in the latter. Bash is not a sane production language.
[0] https://github.com/cloudfoundry/buildpacks-ci (though I note someone snuck in some Crystal and I suspect it was Dave).