weavejester / eftest

Fast and pretty Clojure test runner
425 stars 40 forks source link

Support for clojure 1.9 specs ? #21

Closed marco-m closed 7 years ago

marco-m commented 7 years ago

Hello,

I have a project with the following Lein dependencies:

:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
                 [org.clojure/core.match "0.3.0-alpha5"]
                 [eftest "0.3.1"]]

If I try to use eftest in the REPL, I get

grape.core=> (require '[eftest.runner :as et])

CompilerException clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec:
In: [2 0] val: import fails spec: :clojure.core.specs.alpha/ns-refer-clojure at: [:args :clauses :refer-clojure :clause] predicate: #{:refer-clojure}
In: [2 0] val: import fails spec: :clojure.core.specs.alpha/ns-require at: [:args :clauses :require :clause] predicate: #{:require}
In: [2 0] val: import fails spec: :clojure.core.specs.alpha/ns-import at: [:args :clauses :import :clause] predicate: #{:import}
...

Same thing with

grape.core=> (require '[eftest.runner :refer [find-tests run-tests]])

CompilerException clojure.lang.ExceptionInfo: Call to clojure.core/ns did not conform to spec:
In: [2 0] val: import fails spec: :clojure.core.specs.alpha/ns-refer-clojure at: [:args :clauses :refer-clojure :clause] predicate: #{:refer-clojure}
In: [2 0] val: import fails spec: :clojure.core.specs.alpha/ns-require at: [:args :clauses :require :clause] predicate: #{:require}
...

I am a Clojure newbie, but my understanding is that eftest needs some work to be compliant with Clojure spec introduced in Clojure 1.9. Is this correct?

And thanks for eftest, I really like the readability!

weavejester commented 7 years ago

I'm afraid I can't reproduce the error you're seeing. I created a blank project with those three dependencies, then ran the same require forms, but everything worked fine.

Could you create an example project that demonstrates the error?

marco-m commented 7 years ago

Sure, here it is: https://github.com/marco-m/mango I even removed the clojure.match dependency and I still get the same problem. The README explains the steps I did. Thanks!

weavejester commented 7 years ago

I've cloned the repository and followed the steps detailed in the README, but I still can't reproduce the error. I'm using the same version of Leiningen and Clojure, and I wiped my .m2directory of the relevant dependencies to make sure I was starting afresh.

Do you have anything in your $HOME/.lein/profiles.clj file?

marco-m commented 7 years ago

First, thanks a lot for the quick and helpful follow-up! The only thing I had in $HOME/.lein/profiles.clj was:

{:user {:plugins [[lein-autoreload "0.1.1"]]}}

I removed the file completely and now everything works!

Feel free to close this issue, for me it is resolved :-) On the other hand, are you aware of an incompatibility with lein-autoreload ?

weavejester commented 7 years ago

lein-autoreload might be incompatible with Clojure 1.9.0-alpha17, and it's that incompatibility you're seeing show up as an error.