hyperfiddle / rcf

RCF – a REPL-first, async test macro for Clojure/Script
MIT License
278 stars 12 forks source link

Disable RCF in the JVM during CLJS build (in :require-macros scenario) #67

Open dustingetz opened 2 years ago

dustingetz commented 2 years ago

When the CLJ REPL and Shadow are sharing JVM, RCF tests are enabled at the CLJ repl and Shadow needs to disable JVM RCF tests during incremental builds because :require-macros in a CLJS file will cause the CLJ files to load, running tests if enabled.

https://shadow-cljs.github.io/docs/UsersGuide.html#compile-stages

(defn rcf-shadow-hook 
  {:shadow.build/stage #{:configure :flush}}
  [build-state & args]
  (case (:shadow.build/stage build-state)
    :configure (enable! false)
    :flush (enable!))
  build-state)
dustingetz commented 2 years ago

I am running with this patch locally for a bit

dustingetz commented 1 year ago

See https://clojurians.slack.com/archives/C7Q9GSHFV/p1688040336095859?thread_ts=1688031756.398229&cid=C7Q9GSHFV