clojure-dev

2025-03-17T17:36:42.803509Z

Filed one of the wackier bugs I've seen in a while: https://clojure.atlassian.net/browse/CLJ-2903 Basically, things lined up just right in Clojure 1.12 to change what happens if you (require 'clojure.core) β€”it used to have no effect, but now the namespace does get evaluated. This ends up breaking gen-class because the stuff that gets pulls in via (load "genclass") doesn't run again, so the gen-class macro ends up losing its macro flag. This ended up manifesting in a really obtuse way: I couldn't load some gen-class'd namespaces for some of my projects at the REPL with Clojure 1.12, and that ended up being because https://github.com/clojure-emacs/orchard/blob/2cecd312ae735e0e65c376a441d83e9e60c04390/src/orchard/spec.clj#L58, and https://github.com/clojure/test.check/blob/0ee576eb73d4864c199305c4a0c1e8101d8d1b39/src/main/clojure/clojure/test/check/generators.cljc#L15 to make some CLJC stuff cleaner. I'm interested as to whether you all think that the solution here is doing something to stop clojure.core from being reloaded (as it was pre-1.12), fixing it up such that a reload doesn't break anything, or maybe guiding library developers with some advice that requiring clojure.core isn't something they should be doing in the first place. Ignore, this was PEBKAC.

Alex Miller (Clojure team) 2025-03-17T18:16:42.406759Z

I cannot replicate the timestamp issue in the clojure jar you mentioned - 1.12.0 was released in September and none of those timestamps are newer. Is it possible you walked into core.clj via your IDE and accidentally saved it, updating your local Maven repo jar?

Alex Miller (Clojure team) 2025-03-17T18:17:18.839709Z

(I'm going to guess you did that in Jan 2025 :)

Alex Miller (Clojure team) 2025-03-17T18:18:15.643779Z

similarly, neither of your repros fails for me

2025-03-17T18:53:13.142309Z

ugh that is totally possible

2025-03-17T18:54:36.013489Z

yeah vim-fireplace may have just touched it when I jumped in πŸ˜• I didn't realize it would update files inside jars

2025-03-17T18:55:47.238829Z

Sorry for the confusion, thanks for looking

Alex Miller (Clojure team) 2025-03-17T19:14:32.258839Z

np, easy to un-repro :)