leiningen

Sahil Dhanju 2024-07-15T18:29:18.465019Z

Hi all - quite a specific question. I am trying to use this fork of the clojure compiler https://github.com/flow-storm/clojure and launch a repl through lein repl - a very strange thing is happening though. You can see on this line https://github.com/flow-storm/clojure/blob/cbd31688a9beae95184ef7903959b18f417107b0/src/clj/clojure/main.clj#L532 the string ClojureStorm should print. • However I am greeted with the normal Clojure of the string. • This version seems to be whatever version of the flow-storm/clojure dependency I've specified. • My project has :exclusions [org.clojure/clojure] specified So to me this feels like the normal version of the clojure compiler is running which is very strange. However once the repl is up and running, I have access to the features associated with the ClojureStorm compiler. This feels as if a portion of the flow-storm/clojure library is running after the repl has run but before that only the standard clojure compiler is running. If I run this with clj on the command line the expected behavior happens so this seems to be a Leiningen specific issue. Would anyone have any idea of what this could be? This is my project.clj

(defproject flow-storm-test "0.1.0-SNAPSHOT"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url ""}
  :dependencies [[org.clojure/clojure "1.11.1"]]
  :profiles {:dev {:dependencies [[com.github.flow-storm/clojure "1.11.3-1"]
                                  [com.github.flow-storm/flow-storm-dbg "3.16.0"] ]
                   :exclusions [org.clojure/clojure]
                   :jvm-opts ["-Dclojure.storm.instrumentEnable=true"]}}
  :repl-options {:init-ns flow-storm-test.core})

2024-07-16T17:11:58.759769Z

that is probably because leiningen doesn't use the repl from clojure main, but its own repl, so that line will probably print the correct version but also print Clojure instead of ClojureStorm. But that shouldn't cause any issues with ClojureStorm nor FlowStorm

2024-07-16T17:23:16.586049Z

yeah, so leiningen uses repl-y under the hood when you run lein repl from the terminal, which is a different repl, and it has its own initialization logging https://github.com/trptcolin/reply/blob/9d274242cf566aad0b38d36b76222d589b4c746b/src/clj/reply/initialization.clj#L8-L11

👍 1