A PR using a recently introduced language feature in the compiler, (see Improve compiler spec helpers for macro methods by HertzDevil · Pull Request #11139 · crystal-lang/crystal · Gi) sparked the questions, which earlier compiler version should be able to compiling the compile.
Currently, it is only ensured that the previous compiler release is able to build the next one (
That’s technically sufficient. But I think it would be helpful if there was broader compatibility, for recreating compiler chains/bootstrapping. And it’s easy to accomplish because we already have backward compatbility, so the only thing to do is avoiding to use new language features in the compiler.
It’s more complicated with using new language features in stdlib, though. Because that can be used in the compiler as well. So maybe we should also make sure the compiler compiles with an older stdlib to avoid too narrow dependencies.
Maybe even any
1.x compiler should compile with
1.0 compiler. Alternatively, even saying it should at least compile two or three versions back would be useful.
In any case, if we want to establish such a policy, we should make sure to add a CI job for that.