Hey, folks.
This is a summary of the discussion held on the Crystal Discord.
Right to the problem. It often feels that every other minor release is a breaking one. To put it right, that’s probably okay, given the size of the core team, which can’t test every possible case, but this an example of a library that works with Crystal 1.0, but not 1.7 (I believe that the community can provide even more such examples). This is a situation that ideally should never happen in a stable language.
I think in some ways the community and I in particular have not been paying attention to this problem because:
-
Crystal is a good language.
-
Breakages are usually tiny.
But there’s an even bigger change on the horizon: the PCRE to PCRE2 transition. Overall, it is well explained in the blog post.
What doesn’t feel right is that the blog post literally says, “There are some small differences which can cause breaking changes” but despite this, the change is planned in a minor release (1.8).
This seems even stranger given there is already a huge regression in the standard library. At least in this case there’s a ~50x decrease in performance and a ~1250x increase in memory usage. Doesn’t seem harmless, right? How many of such potential undiscovered cases are there (especially in external libraries)?
Another problem is the set time frame. The above blog post appeared just a month before 1.8, which is supposed to include PCRE2. However, it was first mentioned in the middle of this blog post, but without a clear date and really, I think it should have been a separate blog post from the beginning.
Overall, in my opinion, the situation is very alarming. Crystal is already a relatively niche language. I am currently using it in production, but given that any minor release can potentially be a major release, I may have to reconsider my decision.
Additionally:
Possible solutions:
-
PCRE1 support should remain guaranteed through any 1.x release, but upon 2.0.x it should no longer be guaranteed and the default be switched to PCRE2. Let’s allow some more time for the community to try this change, find what the effects are on their projects and adapt. (Suggested by an Amber maintainer)
-
Crystal should adopt something similar to LTS releases (as Node does) or editions (as Rust does) and clearly state that breaking changes are possible in releases beyond them.
-
?