Home

Please Try the OSH 0.1 Release

2017-09-08

I've released version 0.1 of OSH, a bash-compatible shell:

Follow the instructions in INSTALL.txt, which is also available in the tarball.

There are more details at oilshell.org/release/0.1.0/. All future releases will have an index of docs like this.

What's New?

The changes fall under two major categories:

(1) Implement features and fix bugs exposed by real bash scripts. Before the last release, I ran highly portable shell scripts, as well as my own bash scripts. This time I'm running bash scripts found in the wild.

The most prominent example is the setup.sh script at the foundation of the Nix build process. Issue 26 has details, which I've also summarized in Appendix B below.

(2) Build Fixes. The installation instructions should now work on all Linux distros under x86 or x86_64. If it doesn't, please let me know on issue 16.

In particular, I've fixed bugs on CentOS/RedHat and and 32-bit platforms. (I plan to use QEMU to test other architectures and OSes.)

How Can I Help?

Please run OSH on open source shell scripts that you use. They could target bash, dash, busybox ash, or another shell.

This is as easy as running

$ ./myscript.sh
$ osh ./myscript.sh

and then comparing the output. Something like this might be useful:

$ ./myscript.sh >stdout.txt 2>stderr.txt
$ echo $? >status.txt

If you find a difference, file a bug on Github. I give priority to scripts that I can debug, which is why I was happy to receive issue 26 about Nix.

For the ambitious, the Contributing page has instructions on building, testing, and modifying OSH. Feel free to leave a comment or e-mail me if you need help.

Contributors

(Let me know if I forgot you, and I'll edit this post.)

Caveats

It's still too big and too slow. After OSH runs more real bash scripts, I plan to optimize it.

Appendix A: Project Metrics

Three months ago, I gave an update on project metrics. Here's another update.

Summary of spec tests results for OSH 0.1:

For comparison, the 0.0 release on 7/23 had this summary:

The number of failing tests is larger due to increased test coverage. For example, OSH now has tests for Unicode string manipulation, but Unicode hasn't been properly implemented yet.

Source Code Metrics

The files in /release/0.1.0/metrics/ show that we have almost 14K lines of code in OSH proper.

Including all Python dependencies, it's ~29K lines, and C dependencies are another 164K lines of code. The C dependencies are what I call OVM.

I'm tracking the last two numbers so that I can reduce them over time!

Appendix B: Details on Changes

Here's a summary of the changelog.

Issue 26

Nix things

Things that aren't in the tarball but I did work on: