bash-versions.md
Bash Versions๐
In the wild, all of these will be seen:
5.xseries -- that's the recent.4.xseries -- still shipped in some distros have slow release cycles.3.2series -- shipped by Certain Device Manufacturers with a Funny Relationship to Licensing.
This frankly kinda sucks; especially the 3.x one.
Minimum Version Requirement๐
We have a hard minimum version requirement in this library: 4.4.
We stop here because making it work on anything further back would be both a total rewrite
and also staggeringly hard (if not impossible) to make actually safe.
Older versions are detected and rejected explicitly.๐
We're quite sure things either aren't going to work or aren't going to be safe in older versions, so where that's the case, we check for those versions and reject them clearly.
Usually I don't like version number checks and prefer feature detection. However, with bash, that's just... not super realistic. So, version number checks it is.
This is better than trying to amble along and failing in more obscure ways.
Bash Versions and Testing๐
Some things in the pitfalls document are only unsafe on some versions of bash.
That means we need to run our test on older versions of bash in order to make sure we aren't regressing on our safety when running on those versions. All tests passing on the lastest version of bash doesn't necessarily mean the code is safe and shippable.
(Specifically, two of the assoc-key traps in the pitfalls doc only bite on bash 4.4 through 5.1.)
We haven't automated a test harness for this. Diligence is current manually supplied.
docs/hacking/bash-versions.md ยท 1.6 KiB ยท 2063a16c56