Welcome! Please see the About page for a little more info on how this works.

0 votes
in Compiler by

Hi!

What is a process of validation that next Clojure version has no regression in basic language blocks (basic and special forms) semantics with previous version?

or there is no validation process because basic language blocks are frozen for change?

It is very interesting how Rich evolved early Clojure versions when there were a lot of changes and in the same time Clojure's community already had dozens of written programs which could be broken by backward incompatible changes.

Thanks!

2 Answers

+1 vote
by
edited by
 
Best answer

In general, we do not change semantics, so they don't break. :)

We do add new semantics and sometimes change error cases into new working semantics. The #1 way we avoid breakage is that we think really hard about what we're doing, which I know is out of fashion in software development, but we have a pretty good track record.

From a binary compatibility perspective, there are a few policies we follow. We never make changes in Java implementation classes that may be invoked by compiled Clojure code (this is primarily code in RT and Reflector) - although we do add new methods or arities as needed. We also have similar policies around serialization changes, and around macros that introduce calls to new functions. We do not guarantee binary or serialization compatibility across versions (but we try hard to maintain that as much as possible).

And also there are tests of course, although there are not a ton of those that directly check compilation for example, although all Clojure code is compiled so this is kind of implicitly checked in all tests.

0 votes
by

There's an extensive test suite for Clojure itself and as various alpha and beta releases appear, the community tests them.

Where I work, we've put pretty much every prerelease of Clojure into production as part of our testing cycle since the Clojure 1.3 alphas nearly 13 years ago. It's an incredibly stable product!

by
"extensive test suite for Clojure itsel"
you are talking about https://github.com/clojure/clojure/tree/master/test/clojure/test_clojure, correct?

i can see a lot of test for stdlib and maybe i am missing something but i can't find tests for Clojure lang building blocks (basic and special forms) and can't find any tests suite for compiler (i hardly can tell what exactly should be tested there)

i mean if compiler's logic was changed then how to ensure that there is no regression because of that change
...