Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrumenting coercer specs raises an exception when running reset #8

Open
RickMoynihan opened this issue Nov 19, 2018 · 0 comments
Open

Comments

@RickMoynihan
Copy link

If you define a coercer and put a spec on it, then instrumenting the specs in your project with a call to (clojure.spec.test.alpha/instrument) and then calling (reset) causes duct's ataraxy router to blow up with the following exception:

It appears this might be due to compile and clojure.tools.namespace.repl/refresh.

A workaround is to run (instrument) after the (reset), though this isn't a fully general solution as it will for example mean instrumentation doesn't happen during system init... though integrants spec support may reduce the need for that.

3. Unhandled clojure.lang.ExceptionInfo
   Error on key :duct.router/ataraxy when building system
   { ,,, ,,,}
                 core.cljc:  285  integrant.core$build_exception/invokeStatic
                 core.cljc:  284  integrant.core$build_exception/invoke
                 core.cljc:  296  integrant.core$try_build_action/invokeStatic
                 core.cljc:  293  integrant.core$try_build_action/invoke
                 core.cljc:  302  integrant.core$build_key/invokeStatic
                 core.cljc:  298  integrant.core$build_key/invoke
                  core.clj: 2639  clojure.core/partial/fn
             protocols.clj:  168  clojure.core.protocols/fn
             protocols.clj:  124  clojure.core.protocols/fn
             protocols.clj:   19  clojure.core.protocols/fn/G
             protocols.clj:   31  clojure.core.protocols/seq-reduce
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   13  clojure.core.protocols/fn/G
                  core.clj: 6808  clojure.core/reduce
                  core.clj: 6790  clojure.core/reduce
                 core.cljc:  325  integrant.core$build/invokeStatic
                 core.cljc:  305  integrant.core$build/invoke
                 core.cljc:  460  integrant.core$resume/invokeStatic
                 core.cljc:  450  integrant.core$resume/invoke
                 core.cljc:  456  integrant.core$resume/invokeStatic
                 core.cljc:  450  integrant.core$resume/invoke
                  repl.clj:   42  integrant.repl/resume-system/fn
                  repl.clj:   24  integrant.repl/build-system
                  repl.clj:   22  integrant.repl/build-system
                  repl.clj:   41  integrant.repl/resume-system
                  repl.clj:   40  integrant.repl/resume-system
                  repl.clj:   77  integrant.repl/resume/fn
                  AFn.java:  154  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  Var.java:  308  clojure.lang.Var/alterRoot
                  core.clj: 5510  clojure.core/alter-var-root
                  core.clj: 5505  clojure.core/alter-var-root
               RestFn.java:  425  clojure.lang.RestFn/invoke
                  repl.clj:   75  integrant.repl/resume
                  repl.clj:   71  integrant.repl/resume
                  Var.java:  380  clojure.lang.Var/invoke
                  repl.clj:  100  clojure.tools.namespace.repl/do-refresh
                  repl.clj:   82  clojure.tools.namespace.repl/do-refresh
                  repl.clj:  145  clojure.tools.namespace.repl/refresh
                  repl.clj:  128  clojure.tools.namespace.repl/refresh
               RestFn.java:  421  clojure.lang.RestFn/invoke
                  repl.clj:   84  integrant.repl/reset
                  repl.clj:   82  integrant.repl/reset
                   dev.clj:  128  zib.dev/reset
                   dev.clj:  121  zib.dev/reset
                   dev.clj:  122  zib.dev/reset
                   dev.clj:  121  zib.dev/reset
                      REPL: 1179  zib.dev/eval83157
                      REPL: 1179  zib.dev/eval83157
             Compiler.java: 7178  clojure.lang.Compiler/eval
             Compiler.java: 7133  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
                  main.clj:  390  clojure.main/repl/read-eval-print/fn
                  main.clj:  390  clojure.main/repl/read-eval-print
                  main.clj:  413  clojure.main/repl/fn
                  main.clj:  413  clojure.main/repl
                  main.clj:  316  clojure.main/repl
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj:  660  clojure.core/apply
                regrow.clj:   18  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj: 1973  clojure.core/with-bindings*
                  core.clj: 1973  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   85  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  222  clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
    interruptible_eval.clj:  190  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
                  AFn.java:   22  clojure.lang.AFn/run
   ThreadPoolExecutor.java: 1149  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  624  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  748  java.lang.Thread/run
2. Caused by java.lang.ExceptionInInitializerError
   (No message)
NativeConstructorAccessorImpl.java:   -2  sun.reflect.NativeConstructorAccessorImpl/newInstance0
NativeConstructorAccessorImpl.java:   62  sun.reflect.NativeConstructorAccessorImpl/newInstance
DelegatingConstructorAccessorImpl.java:   45  sun.reflect.DelegatingConstructorAccessorImpl/newInstance
          Constructor.java:  423  java.lang.reflect.Constructor/newInstance
                Class.java:  442  java.lang.Class/newInstance
             Compiler.java: 4996  clojure.lang.Compiler$ObjExpr/eval
             Compiler.java: 7177  clojure.lang.Compiler/eval
             Compiler.java: 7133  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
                  core.clj:  269  ataraxy.core/compile
                  core.clj:  263  ataraxy.core/compile
                  core.clj:  335  ataraxy.core/handler
                  core.clj:  319  ataraxy.core/handler
               ataraxy.clj:   33  duct.router.ataraxy/eval68787/fn
              MultiFn.java:  234  clojure.lang.MultiFn/invoke
                 core.cljc:  377  integrant.core$eval15710$fn__15711/invoke
              MultiFn.java:  244  clojure.lang.MultiFn/invoke
                 core.cljc:  463  integrant.core$resume$fn__15753/invoke
                 core.cljc:  294  integrant.core$try_build_action/invokeStatic
                 core.cljc:  293  integrant.core$try_build_action/invoke
                 core.cljc:  302  integrant.core$build_key/invokeStatic
                 core.cljc:  298  integrant.core$build_key/invoke
                  core.clj: 2639  clojure.core/partial/fn
             protocols.clj:  168  clojure.core.protocols/fn
             protocols.clj:  124  clojure.core.protocols/fn
             protocols.clj:   19  clojure.core.protocols/fn/G
             protocols.clj:   31  clojure.core.protocols/seq-reduce
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   13  clojure.core.protocols/fn/G
                  core.clj: 6808  clojure.core/reduce
                  core.clj: 6790  clojure.core/reduce
                 core.cljc:  325  integrant.core$build/invokeStatic
                 core.cljc:  305  integrant.core$build/invoke
                 core.cljc:  460  integrant.core$resume/invokeStatic
                 core.cljc:  450  integrant.core$resume/invoke
                 core.cljc:  456  integrant.core$resume/invokeStatic
                 core.cljc:  450  integrant.core$resume/invoke
                  repl.clj:   42  integrant.repl/resume-system/fn
                  repl.clj:   24  integrant.repl/build-system
                  repl.clj:   22  integrant.repl/build-system
                  repl.clj:   41  integrant.repl/resume-system
                  repl.clj:   40  integrant.repl/resume-system
                  repl.clj:   77  integrant.repl/resume/fn
                  AFn.java:  154  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  Var.java:  308  clojure.lang.Var/alterRoot
                  core.clj: 5510  clojure.core/alter-var-root
                  core.clj: 5505  clojure.core/alter-var-root
               RestFn.java:  425  clojure.lang.RestFn/invoke
                  repl.clj:   75  integrant.repl/resume
                  repl.clj:   71  integrant.repl/resume
                  Var.java:  380  clojure.lang.Var/invoke
                  repl.clj:  100  clojure.tools.namespace.repl/do-refresh
                  repl.clj:   82  clojure.tools.namespace.repl/do-refresh
                  repl.clj:  145  clojure.tools.namespace.repl/refresh
                  repl.clj:  128  clojure.tools.namespace.repl/refresh
               RestFn.java:  421  clojure.lang.RestFn/invoke
                  repl.clj:   84  integrant.repl/reset
                  repl.clj:   82  integrant.repl/reset
                   dev.clj:  128  zib.dev/reset
                   dev.clj:  121  zib.dev/reset
                   dev.clj:  122  zib.dev/reset
                   dev.clj:  121  zib.dev/reset
                      REPL: 1179  zib.dev/eval83157
                      REPL: 1179  zib.dev/eval83157
             Compiler.java: 7178  clojure.lang.Compiler/eval
             Compiler.java: 7133  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
                  main.clj:  390  clojure.main/repl/read-eval-print/fn
                  main.clj:  390  clojure.main/repl/read-eval-print
                  main.clj:  413  clojure.main/repl/fn
                  main.clj:  413  clojure.main/repl
                  main.clj:  316  clojure.main/repl
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj:  660  clojure.core/apply
                regrow.clj:   18  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj: 1973  clojure.core/with-bindings*
                  core.clj: 1973  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   85  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  222  clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
    interruptible_eval.clj:  190  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
                  AFn.java:   22  clojure.lang.AFn/run
   ThreadPoolExecutor.java: 1149  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  624  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  748  java.lang.Thread/run
1. Caused by java.lang.IllegalArgumentException
   No matching ctor found for class
   clojure.spec.test.alpha$spec_checking_fn$fn__3026
            Reflector.java:  237  clojure.lang.Reflector/invokeConstructor
           LispReader.java: 1307  clojure.lang.LispReader$EvalReader/invoke
           LispReader.java:  843  clojure.lang.LispReader$DispatchReader/invoke
           LispReader.java:  275  clojure.lang.LispReader/read
           LispReader.java:  206  clojure.lang.LispReader/read
           LispReader.java:  195  clojure.lang.LispReader/read
                   RT.java: 1873  clojure.lang.RT/readString
                   RT.java: 1868  clojure.lang.RT/readString
                      REPL: 1179  zib.dev/eval83246
NativeConstructorAccessorImpl.java:   -2  sun.reflect.NativeConstructorAccessorImpl/newInstance0
NativeConstructorAccessorImpl.java:   62  sun.reflect.NativeConstructorAccessorImpl/newInstance
DelegatingConstructorAccessorImpl.java:   45  sun.reflect.DelegatingConstructorAccessorImpl/newInstance
          Constructor.java:  423  java.lang.reflect.Constructor/newInstance
                Class.java:  442  java.lang.Class/newInstance
             Compiler.java: 4996  clojure.lang.Compiler$ObjExpr/eval
             Compiler.java: 7177  clojure.lang.Compiler/eval
             Compiler.java: 7133  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
                  core.clj:  269  ataraxy.core/compile
                  core.clj:  263  ataraxy.core/compile
                  core.clj:  335  ataraxy.core/handler
                  core.clj:  319  ataraxy.core/handler
               ataraxy.clj:   33  duct.router.ataraxy/eval68787/fn
              MultiFn.java:  234  clojure.lang.MultiFn/invoke
                 core.cljc:  377  integrant.core$eval15710$fn__15711/invoke
              MultiFn.java:  244  clojure.lang.MultiFn/invoke
                 core.cljc:  463  integrant.core$resume$fn__15753/invoke
                 core.cljc:  294  integrant.core$try_build_action/invokeStatic
                 core.cljc:  293  integrant.core$try_build_action/invoke
                 core.cljc:  302  integrant.core$build_key/invokeStatic
                 core.cljc:  298  integrant.core$build_key/invoke
                  core.clj: 2639  clojure.core/partial/fn
             protocols.clj:  168  clojure.core.protocols/fn
             protocols.clj:  124  clojure.core.protocols/fn
             protocols.clj:   19  clojure.core.protocols/fn/G
             protocols.clj:   31  clojure.core.protocols/seq-reduce
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   13  clojure.core.protocols/fn/G
                  core.clj: 6808  clojure.core/reduce
                  core.clj: 6790  clojure.core/reduce
                 core.cljc:  325  integrant.core$build/invokeStatic
                 core.cljc:  305  integrant.core$build/invoke
                 core.cljc:  460  integrant.core$resume/invokeStatic
                 core.cljc:  450  integrant.core$resume/invoke
                 core.cljc:  456  integrant.core$resume/invokeStatic
                 core.cljc:  450  integrant.core$resume/invoke
                  repl.clj:   42  integrant.repl/resume-system/fn
                  repl.clj:   24  integrant.repl/build-system
                  repl.clj:   22  integrant.repl/build-system
                  repl.clj:   41  integrant.repl/resume-system
                  repl.clj:   40  integrant.repl/resume-system
                  repl.clj:   77  integrant.repl/resume/fn
                  AFn.java:  154  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  Var.java:  308  clojure.lang.Var/alterRoot
                  core.clj: 5510  clojure.core/alter-var-root
                  core.clj: 5505  clojure.core/alter-var-root
               RestFn.java:  425  clojure.lang.RestFn/invoke
                  repl.clj:   75  integrant.repl/resume
                  repl.clj:   71  integrant.repl/resume
                  Var.java:  380  clojure.lang.Var/invoke
                  repl.clj:  100  clojure.tools.namespace.repl/do-refresh
                  repl.clj:   82  clojure.tools.namespace.repl/do-refresh
                  repl.clj:  145  clojure.tools.namespace.repl/refresh
                  repl.clj:  128  clojure.tools.namespace.repl/refresh
               RestFn.java:  421  clojure.lang.RestFn/invoke
                  repl.clj:   84  integrant.repl/reset
                  repl.clj:   82  integrant.repl/reset
                   dev.clj:  128  zib.dev/reset
                   dev.clj:  121  zib.dev/reset
                   dev.clj:  122  zib.dev/reset
                   dev.clj:  121  zib.dev/reset
                      REPL: 1179  zib.dev/eval83157
                      REPL: 1179  zib.dev/eval83157
             Compiler.java: 7178  clojure.lang.Compiler/eval
             Compiler.java: 7133  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
                  main.clj:  390  clojure.main/repl/read-eval-print/fn
                  main.clj:  390  clojure.main/repl/read-eval-print
                  main.clj:  413  clojure.main/repl/fn
                  main.clj:  413  clojure.main/repl
                  main.clj:  316  clojure.main/repl
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj:  660  clojure.core/apply
                regrow.clj:   18  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj: 1973  clojure.core/with-bindings*
                  core.clj: 1973  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   85  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  222  clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
    interruptible_eval.clj:  190  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
                  AFn.java:   22  clojure.lang.AFn/run
   ThreadPoolExecutor.java: 1149  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  624  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  748  java.lang.Thread/run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant