At the end of the last post, I said I would provide a roadmap for an OSH release. My goal is to release something useful by the end of the summer.
But after drafting the roadmap a few weeks ago, I wasn't sure I could finish everything I wanted to. This post takes stock of the situation.
The roadmap had four high-level goals:
installsteps aren't done, and I'd like to build it on at least one other POSIX operating system.
In short, OSH should be easily buildable, run real programs, and give better error messages than bash.
I believe that this will make the OSH 0.1 release interesting and useful. A better bash isn't the entirety of the Oil project, but it's a big milestone.
I had done enough work on the build system to be confident about area #1. Forgoing autotools makes this a bigger task than usual, but it didn't seem risky.
And I knew that the parser and ASDL representation of shell were in good shape, having been well tested. I mentioned that on Hacker News that I think parsing is 60% of the work of a shell.
But the error handling was still inconsistent, and I didn't have a good sense of how much work was left on the shell executor and runtime. Basic things worked, but OSH would also fail to run simple scripts.
So, in the last few weeks, I've done extensive work on the runtime, addressing areas #2, #3 and #4. What did I accomplish?
First, I'm happy with the rapid progress on spec tests:
So there are over 100 more tests passing in less than 2 weeks.
Secondly, I can run many of my own shell programs, particularly the thousands of lines of build and test automation in the oil repo itself. Running other people's programs still needs work, but I'm hitting expected errors, not big surprises.
After this "sprint", I feel more optimistic about a useful OSH release by the end of summer.
I wrote a lot about the parser last year, but I haven't written much about the shell runtime (*). So even though I said I would concentrate on coding over blogging until the OSH release, I don't want to be completely silent about the runtime.
So the next few posts will be a log of what I did. The idea is to give you a flavor for the long slog of implementing shell features.
For example, I implemented many shell builtins. And I overhauled the abstractions for processes and redirects, which made pipelines and background jobs simpler and more correct.
It's a long list, but I'll call out the interesting parts. Leave a comment if there's a particular part of the runtime you'd like to see covered.
(*) I gave another overview of the parser in this recent Hacker News comment.