Welcome! Please see the About page for a little more info on how this works.
The clojure.spec.test.alpha namespace in clojure.spec 0.3.214 namepace is still AOT-compiled using the locking macro from clojure 1.10.1:
This old locking macro is troublesome with GraalVM native image. See CLJ-1472.
I think if you compile clojure.spec with clojure 1.10.3 then you can just keep using locking and the old locking2 workaround can be removed over here:
An alternative solution would be to also use the locking2 macro in clojure.spec.test.alpha.
Released spec.alpha 0.3.218