clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
Karol Wójcik 2021-01-04T11:20:05.028100Z

Hello! Is it possible to disable load of clojure.spec.alpha completely?

Karol Wójcik 2021-01-05T16:09:25.031800Z

Will try to provide minimal repro during weekend.

2021-01-04T11:34:58.028200Z

clojure.spec.alpha is not part of Clojure, so what do you mean by “disable load”?

2021-01-04T12:40:40.028400Z

it is not possible.

Karol Wójcik 2021-01-04T13:03:23.028600Z

@hkjels it seems java11 dynamically loads clojure.spec.alpha which results in error: https://clojurians.slack.com/archives/C03S1KBA2/p1609747607299900

2021-01-04T13:11:01.028900Z

strange, clojure.walk is not requiring clojure.spec.alpha

Karol Wójcik 2021-01-04T13:13:26.029100Z

For me the strangest thing is that even after removing clojure.walk dynamic class load requires spec.alpha which results in different error. Never seen it before.

2021-01-04T13:18:41.029300Z

but spec.alpha is require clojure.walk …

2021-01-04T13:20:13.029500Z

and clojure compiler is using clojure.spec.alpha there https://github.com/clojure/clojure/blob/05c193c031aa3a825ebb824b4135e36a79693f51/src/jvm/clojure/lang/Compiler.java#L6961

alexmiller 2021-01-04T14:36:24.030900Z

See -Dclojure.spec.skip-macros=true https://clojure.org/guides/faq#skip_macros for turning off macro checking

alexmiller 2021-01-04T14:37:06.031Z

spec depends on clojure, and clojure depends on spec. so there is actually a cycle here conceptually.

Karol Wójcik 2021-01-04T14:55:12.031200Z

@alexmiller tried to set -Dclojure.spec.skip-macros=true without results. Here is the example: https://github.com/ekoontz/holy-lambda/blob/repro-spec/examples/hello-lambda/project.clj Wondering why Clojure compiler macroexpands on runtime