slagyr / speclj

pronounced "speckle": a TDD/BDD framework for Clojure.
MIT License
459 stars 58 forks source link

lein spec crashes when exposed to core.cache? #72

Closed canweriotnow closed 10 years ago

canweriotnow commented 10 years ago

Not sure if this should be reported here or on luminus-template, but I can't seem to resolve it... when running this test:

(ns hedgehog.handler-spec
  (:require [speclj.core :refer :all]
            [ring.mock.request :refer :all]
            [hedgehog.handler :refer :all]))

(describe "main-route"
   (it "should return a 200 status"
       (let [response (app (request :get "/"))]
            (should= (:status response) 200))))

(run-specs)

This stacktrace is produced:

Errors:

  1) java.lang.ExceptionInInitializerError
     java.lang.ExceptionInInitializerError
        ... 18 stack levels elided ...
        at ring.middleware.format$loading__4910__auto__.invoke(format.clj:1)
        at ring.middleware.format__init.load(Unknown Source)
        at ring.middleware.format__init.<clinit>(Unknown Source)
        ... 18 stack levels elided ...
        at noir.util.middleware$loading__4910__auto__.invoke(middleware.clj:1)
        at noir.util.middleware__init.load(Unknown Source)
        at noir.util.middleware__init.<clinit>(Unknown Source)
        ... 18 stack levels elided ...
        at hedgehog.handler$loading__4910__auto__.invoke(handler.clj:1)
        at hedgehog.handler__init.load(Unknown Source)
        at hedgehog.handler__init.<clinit>(Unknown Source)
        ... 18 stack levels elided ...
        at hedgehog.handler_spec$eval684$loading__4910__auto____685.invoke(/Users/jason/estuary/hedgehog/spec/hedgehog/handler_spec.clj:1)
        at hedgehog.handler_spec$eval684.invoke(/Users/jason/estuary/hedgehog/spec/hedgehog/handler_spec.clj:1)
        ... 17 stack levels elided ...
        at user$eval676.invoke(NO_SOURCE_FILE)
        ... 4 stack levels elided ...
        at leiningen.core.eval$fn__3577.invoke(eval.clj:304)
        ... 1 stack levels elided ...
        at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
        at leiningen.spec$spec.doInvoke(spec.clj:36)
        ... 5 stack levels elided ...
        at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
        ... 6 stack levels elided ...
        at leiningen.core.main$apply_task.invoke(main.clj:230)
        at lein_environ.plugin$write_env_to_file.invoke(plugin.clj:11)
        ... 4 stack levels elided ...
        at robert.hooke$compose_hooks$fn__8655.doInvoke(hooke.clj:40)
        ... 2 stack levels elided ...
        at robert.hooke$run_hooks.invoke(hooke.clj:46)
        at robert.hooke$prepare_for_hooks$fn__8660$fn__8661.doInvoke(hooke.clj:54)
        ... 3 stack levels elided ...
        at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
        at leiningen.core.main$_main$fn__3092.invoke(main.clj:303)
        at leiningen.core.main$_main.doInvoke(main.clj:290)
        ... 12 stack levels elided ...
     Caused by: java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.core.cache/through
        ... 9 stack levels elided ...
        at ring.middleware.format_response$make_encoder.invoke(format_response.clj:94)
        at ring.middleware.format_response__init.load(Unknown Source)
        at ring.middleware.format_response__init.<clinit>(Unknown Source)
        ... 18 stack levels elided ...
        at ring.middleware.format$loading__4910__auto__.invoke(format.clj:1)
        at ring.middleware.format__init.load(Unknown Source)
        at ring.middleware.format__init.<clinit>(Unknown Source)
        ... 18 stack levels elided ...
        at noir.util.middleware$loading__4910__auto__.invoke(middleware.clj:1)
        at noir.util.middleware__init.load(Unknown Source)
        at noir.util.middleware__init.<clinit>(Unknown Source)
        ... 18 stack levels elided ...
        at hedgehog.handler$loading__4910__auto__.invoke(handler.clj:1)
        at hedgehog.handler__init.load(Unknown Source)
        at hedgehog.handler__init.<clinit>(Unknown Source)
        ... 18 stack levels elided ...
        at hedgehog.handler_spec$eval684$loading__4910__auto____685.invoke(/Users/jason/estuary/hedgehog/spec/hedgehog/handler_spec.clj:1)
        at hedgehog.handler_spec$eval684.invoke(/Users/jason/estuary/hedgehog/spec/hedgehog/handler_spec.clj:1)
        ... 17 stack levels elided ...
        at user$eval676.invoke(NO_SOURCE_FILE)
        ... 4 stack levels elided ...
        at leiningen.core.eval$fn__3577.invoke(eval.clj:304)
        ... 1 stack levels elided ...
        at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
        at leiningen.spec$spec.doInvoke(spec.clj:36)
        ... 5 stack levels elided ...
        at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
        ... 6 stack levels elided ...
        at leiningen.core.main$apply_task.invoke(main.clj:230)
        at lein_environ.plugin$write_env_to_file.invoke(plugin.clj:11)
        ... 4 stack levels elided ...
        at robert.hooke$compose_hooks$fn__8655.doInvoke(hooke.clj:40)
        ... 2 stack levels elided ...
        at robert.hooke$run_hooks.invoke(hooke.clj:46)
        at robert.hooke$prepare_for_hooks$fn__8660$fn__8661.doInvoke(hooke.clj:54)
        ... 3 stack levels elided ...
        at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
        at leiningen.core.main$_main$fn__3092.invoke(main.clj:303)
        at leiningen.core.main$_main.doInvoke(main.clj:290)
        ... 12 stack levels elided ...

Finished in 0.00000 seconds
1 examples, 0 failures, 1 errors

The culprit seems to be java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.core.cache/through, but I have no idea how to resolve it...

Running an equivalent test with core.test is successful.

There's a bit more detailed info in this gist

mylesmegyesi commented 10 years ago

@canweriotnow sorry about the troubles. Can you run speclj with full backtrace enabled and report back?

$ lein spec -b
canweriotnow commented 10 years ago

@mylesmegyesi Sorry for the delay... here's the full backtrace:

$ lein spec -b
Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java...
E

Errors:

  1) java.lang.ExceptionInInitializerError
     java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at clojure.lang.RT.loadClassForName(RT.java:2098)
        at clojure.lang.RT.load(RT.java:430)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5336)
        at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
        at clojure.core$load_lib.doInvoke(core.clj:5374)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$load_libs.doInvoke(core.clj:5417)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$require.doInvoke(core.clj:5496)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at ring.middleware.format$loading__4910__auto__.invoke(format.clj:1)
        at ring.middleware.format__init.load(Unknown Source)
        at ring.middleware.format__init.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at clojure.lang.RT.loadClassForName(RT.java:2098)
        at clojure.lang.RT.load(RT.java:430)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5336)
        at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
        at clojure.core$load_lib.doInvoke(core.clj:5374)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$load_libs.doInvoke(core.clj:5413)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:621)
        at clojure.core$use.doInvoke(core.clj:5507)
        at clojure.lang.RestFn.invoke(RestFn.java:930)
        at noir.util.middleware$loading__4910__auto__.invoke(middleware.clj:1)
        at noir.util.middleware__init.load(Unknown Source)
        at noir.util.middleware__init.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at clojure.lang.RT.loadClassForName(RT.java:2098)
        at clojure.lang.RT.load(RT.java:430)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5336)
        at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
        at clojure.core$load_lib.doInvoke(core.clj:5374)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$load_libs.doInvoke(core.clj:5413)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$require.doInvoke(core.clj:5496)
        at clojure.lang.RestFn.invoke(RestFn.java:1523)
        at hedgehog.handler$loading__4910__auto__.invoke(handler.clj:1)
        at hedgehog.handler__init.load(Unknown Source)
        at hedgehog.handler__init.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at clojure.lang.RT.loadClassForName(RT.java:2098)
        at clojure.lang.RT.load(RT.java:430)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5336)
        at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
        at clojure.core$load_lib.doInvoke(core.clj:5374)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$load_libs.doInvoke(core.clj:5413)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$require.doInvoke(core.clj:5496)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at hedgehog.handler_spec$eval1433$loading__4910__auto____1434.invoke(/Users/jason/estuary/hedgehog-exp1/spec/hedgehog/handler_spec.clj:1)
        at hedgehog.handler_spec$eval1433.invoke(/Users/jason/estuary/hedgehog-exp1/spec/hedgehog/handler_spec.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6619)
        at clojure.lang.Compiler.eval(Compiler.java:6608)
        at clojure.lang.Compiler.load(Compiler.java:7064)
        at speclj.run.standard$load_spec.invoke(standard.clj:16)
        at speclj.run.standard.StandardRunner$fn__1398$fn__1405.invoke(standard.clj:27)
        at speclj.run.standard.StandardRunner$fn__1398.invoke(standard.clj:26)
        at speclj.run.standard.StandardRunner.run_directories(standard.clj:24)
        at speclj.cli$do_specs$fn__1256.invoke(cli.clj:87)
        at clojure.lang.AFn.applyToHelper(AFn.java:159)
        at clojure.lang.AFn.applyTo(AFn.java:151)
        at clojure.core$apply.invoke(core.clj:617)
        at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1788)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at speclj.cli$do_specs.invoke(cli.clj:83)
        at speclj.cli$run.doInvoke(cli.clj:99)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:617)
        at user$eval1262.invoke(NO_SOURCE_FILE)
        at clojure.lang.Compiler.eval(Compiler.java:6619)
        at clojure.lang.Compiler.eval(Compiler.java:6609)
        at clojure.lang.Compiler.eval(Compiler.java:6582)
        at clojure.core$eval.invoke(core.clj:2852)
        at leiningen.core.eval$fn__3577.invoke(eval.clj:304)
        at clojure.lang.MultiFn.invoke(MultiFn.java:231)
        at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
        at leiningen.spec$spec.doInvoke(spec.clj:36)
        at clojure.lang.RestFn.invoke(RestFn.java:423)
        at clojure.lang.Var.invoke(Var.java:419)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$apply_task.invoke(main.clj:230)
        at lein_environ.plugin$write_env_to_file.invoke(plugin.clj:11)
        at clojure.lang.Var.invoke(Var.java:427)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at robert.hooke$compose_hooks$fn__8655.doInvoke(hooke.clj:40)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:617)
        at robert.hooke$run_hooks.invoke(hooke.clj:46)
        at robert.hooke$prepare_for_hooks$fn__8660$fn__8661.doInvoke(hooke.clj:54)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
        at leiningen.core.main$_main$fn__3092.invoke(main.clj:303)
        at leiningen.core.main$_main.doInvoke(main.clj:290)
        at clojure.lang.RestFn.invoke(RestFn.java:421)
        at clojure.lang.Var.invoke(Var.java:419)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:617)
        at clojure.main$main_opt.invoke(main.clj:335)
        at clojure.main$main.doInvoke(main.clj:440)
        at clojure.lang.RestFn.invoke(RestFn.java:457)
        at clojure.lang.Var.invoke(Var.java:427)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
     Caused by: java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.core.cache/through
        at clojure.lang.Var$Unbound.throwArity(Var.java:43)
        at clojure.lang.AFn.invoke(AFn.java:51)
        at clojure.core.memoize$through_STAR_.invoke(memoize.clj:52)
        at clojure.lang.Atom.swap(Atom.java:65)
        at clojure.core$swap_BANG_.invoke(core.clj:2162)
        at clojure.core.memoize$build_memoizer$fn__3831.doInvoke(memoize.clj:134)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at ring.middleware.format_response$make_encoder.invoke(format_response.clj:94)
        at ring.middleware.format_response__init.load(Unknown Source)
        at ring.middleware.format_response__init.<clinit>(Unknown Source)
        ... 148 more

Finished in 0.00000 seconds
1 examples, 0 failures, 1 errors
JuneKelly commented 10 years ago

I've just encountered the same issue.

I narrowed it down to being the (:require [xyz.handler :refer :all]) call that causes the crash.

In my own project, all the other requirements will load ok, but trying to require (or use) the handler namespace will crash speclj

The following is the result of lein spec -b:

Errors:

  1) java.lang.ExceptionInInitializerError
     java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at clojure.lang.RT.loadClassForName(RT.java:2098)
        at clojure.lang.RT.load(RT.java:430)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5336)
        at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
        at clojure.core$load_lib.doInvoke(core.clj:5374)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$load_libs.doInvoke(core.clj:5417)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$require.doInvoke(core.clj:5496)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at ring.middleware.format$loading__4910__auto__.invoke(format.clj:1)
        at ring.middleware.format__init.load(Unknown Source)
        at ring.middleware.format__init.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at clojure.lang.RT.loadClassForName(RT.java:2098)
        at clojure.lang.RT.load(RT.java:430)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5336)
        at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
        at clojure.core$load_lib.doInvoke(core.clj:5374)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$load_libs.doInvoke(core.clj:5413)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:621)
        at clojure.core$use.doInvoke(core.clj:5507)
        at clojure.lang.RestFn.invoke(RestFn.java:930)
        at noir.util.middleware$loading__4910__auto__.invoke(middleware.clj:1)
        at noir.util.middleware__init.load(Unknown Source)
        at noir.util.middleware__init.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at clojure.lang.RT.loadClassForName(RT.java:2098)
        at clojure.lang.RT.load(RT.java:430)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5336)
        at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
        at clojure.core$load_lib.doInvoke(core.clj:5374)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$load_libs.doInvoke(core.clj:5413)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$require.doInvoke(core.clj:5496)
        at clojure.lang.RestFn.invoke(RestFn.java:703)
        at radsticks.handler$loading__4910__auto__.invoke(handler.clj:1)
        at radsticks.handler__init.load(Unknown Source)
        at radsticks.handler__init.<clinit>(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at clojure.lang.RT.loadClassForName(RT.java:2098)
        at clojure.lang.RT.load(RT.java:430)
        at clojure.lang.RT.load(RT.java:411)
        at clojure.core$load$fn__5018.invoke(core.clj:5530)
        at clojure.core$load.doInvoke(core.clj:5529)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.core$load_one.invoke(core.clj:5336)
        at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)
        at clojure.core$load_lib.doInvoke(core.clj:5374)
        at clojure.lang.RestFn.applyTo(RestFn.java:142)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$load_libs.doInvoke(core.clj:5413)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at clojure.core$require.doInvoke(core.clj:5496)
        at clojure.lang.RestFn.invoke(RestFn.java:482)
        at radsticks.api_spec$eval1433$loading__4910__auto____1434.invoke(/home/shane/code/clojure/radsticks/spec/radsticks/api_spec.clj:1)
        at radsticks.api_spec$eval1433.invoke(/home/shane/code/clojure/radsticks/spec/radsticks/api_spec.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:6619)
        at clojure.lang.Compiler.eval(Compiler.java:6608)
        at clojure.lang.Compiler.load(Compiler.java:7064)
        at speclj.run.standard$load_spec.invoke(standard.clj:16)
        at speclj.run.standard.StandardRunner$fn__1398$fn__1405.invoke(standard.clj:27)
        at speclj.run.standard.StandardRunner$fn__1398.invoke(standard.clj:26)
        at speclj.run.standard.StandardRunner.run_directories(standard.clj:24)
        at speclj.cli$do_specs$fn__1256.invoke(cli.clj:87)
        at clojure.lang.AFn.applyToHelper(AFn.java:159)
        at clojure.lang.AFn.applyTo(AFn.java:151)
        at clojure.core$apply.invoke(core.clj:617)
        at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1788)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at speclj.cli$do_specs.invoke(cli.clj:83)
        at speclj.cli$run.doInvoke(cli.clj:99)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:617)
        at user$eval1262.invoke(NO_SOURCE_FILE)
        at clojure.lang.Compiler.eval(Compiler.java:6619)
        at clojure.lang.Compiler.eval(Compiler.java:6609)
        at clojure.lang.Compiler.eval(Compiler.java:6582)
        at clojure.core$eval.invoke(core.clj:2852)
        at leiningen.core.eval$fn__3577.invoke(eval.clj:304)
        at clojure.lang.MultiFn.invoke(MultiFn.java:231)
        at leiningen.core.eval$eval_in_project.invoke(eval.clj:326)
        at leiningen.spec$spec.doInvoke(spec.clj:36)
        at clojure.lang.RestFn.invoke(RestFn.java:423)
        at clojure.lang.Var.invoke(Var.java:419)
        at clojure.lang.AFn.applyToHelper(AFn.java:163)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$apply_task.invoke(main.clj:230)
        at lein_environ.plugin$write_env_to_file.invoke(plugin.clj:11)
        at clojure.lang.Var.invoke(Var.java:427)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at robert.hooke$compose_hooks$fn__8655.doInvoke(hooke.clj:40)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:617)
        at robert.hooke$run_hooks.invoke(hooke.clj:46)
        at robert.hooke$prepare_for_hooks$fn__8660$fn__8661.doInvoke(hooke.clj:54)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at leiningen.with_profile$with_profiles_STAR_.invoke(with_profile.clj:15)
        at leiningen.with_profile$with_profile$fn__8718.invoke(with_profile.clj:66)
        at leiningen.with_profile$with_profile.doInvoke(with_profile.clj:64)
        at clojure.lang.RestFn.invoke(RestFn.java:467)
        at clojure.lang.Var.invoke(Var.java:427)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
        at clojure.lang.RestFn.applyTo(RestFn.java:139)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:619)
        at leiningen.core.main$apply_task.invoke(main.clj:230)
        at lein_environ.plugin$write_env_to_file.invoke(plugin.clj:11)
        at clojure.lang.Var.invoke(Var.java:427)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:619)
        at robert.hooke$compose_hooks$fn__8655.doInvoke(hooke.clj:40)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.core$apply.invoke(core.clj:617)
        at robert.hooke$run_hooks.invoke(hooke.clj:46)
        at robert.hooke$prepare_for_hooks$fn__8660$fn__8661.doInvoke(hooke.clj:54)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.invoke(RestFn.java:436)
        at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
        at leiningen.core.main$_main$fn__3092.invoke(main.clj:303)
        at leiningen.core.main$_main.doInvoke(main.clj:290)
        at clojure.lang.RestFn.invoke(RestFn.java:457)
        at clojure.lang.Var.invoke(Var.java:427)
        at clojure.lang.AFn.applyToHelper(AFn.java:172)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.core$apply.invoke(core.clj:617)
        at clojure.main$main_opt.invoke(main.clj:335)
        at clojure.main$main.doInvoke(main.clj:440)
        at clojure.lang.RestFn.invoke(RestFn.java:512)
        at clojure.lang.Var.invoke(Var.java:435)
        at clojure.lang.AFn.applyToHelper(AFn.java:185)
        at clojure.lang.Var.applyTo(Var.java:532)
        at clojure.main.main(main.java:37)
     Caused by: java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.core.cache/through
        at clojure.lang.Var$Unbound.throwArity(Var.java:43)
        at clojure.lang.AFn.invoke(AFn.java:51)
        at clojure.core.memoize$through_STAR_.invoke(memoize.clj:52)
        at clojure.lang.Atom.swap(Atom.java:65)
        at clojure.core$swap_BANG_.invoke(core.clj:2162)
        at clojure.core.memoize$build_memoizer$fn__5646.doInvoke(memoize.clj:134)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at ring.middleware.format_response$make_encoder.invoke(format_response.clj:94)
        at ring.middleware.format_response__init.load(Unknown Source)
        at ring.middleware.format_response__init.<clinit>(Unknown Source)
        ... 175 more
JuneKelly commented 10 years ago

I've just tried rolling back to speclj version 2.8.0 and it appears to not suffer from this bug, the spec file manages to load correctly without crashing.

Versions 2.8.1 through 2.9.1 crash when loading the handler namespace.

canweriotnow commented 10 years ago

Thanks! I'll try rolling back and reproduce... If that works, maybe a diff with 1.8.1 will be illuminating. On Feb 25, 2014 4:41 PM, "Shane Kilkelly" notifications@github.com wrote:

I've just tried rolling back to speclj version 2.8.0 and it appears to not suffer from this bug, the spec file manages to load correctly without crashing.

Versions 2.8.1 through 2.9.1 crash when loading the handler namespace.

— Reply to this email directly or view it on GitHubhttps://github.com/slagyr/speclj/issues/72#issuecomment-36061699 .

slagyr commented 10 years ago

I believe this is resolved in speclj 3.0.0. @ShaneKilkelly I was able to reproduce the problem on you radsticks project using speclj 2.9.1.... and I confirmed it worked on both 2.8.0 and 3.0.0.

Cause? In resolving issue 67, the spec task added :eval-in :leiningen to the project. As @technomancy pointed out there, and @fredericksgary pointed out in issue 78, this was not such a good idea. It was resolved on 3.0.0.