IGJoshua / farolero

Thread-safe Common Lisp style conditions and restarts for Clojure(Script) and Babashka.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v1.4.2: clojure.lang.ExceptionInfo: Call to #'farolero.core/return-from did not conform to spec.

enspritz opened this issue · comments

With farolero 1.4.2 released after #14 , the test suite produces the following spec conformance problem:

ERROR in vivid.art.cli.delimiters-test/bad-values (alpha.clj:132)               
expected: (=
           (quote validate-delimiters)
           (farolero/handler-case
            (validate/validate-delimiters nil)
            (:vivid.art.cli/error [_ {:keys [step]}] step)))
  actual: 
clojure.lang.ExceptionInfo: Call to #'farolero.core/return-from did not conform to spec.
           clojure.spec.alpha/args: (8
                                     [(0
                                       :vivid.art.cli/error
                                       {:step validate-delimiters,
                                        :message "Non-conformant delimiter specification: 'null'"})
                                      true])
        clojure.spec.alpha/failure: :instrument
             clojure.spec.alpha/fn: farolero.core/return-from
       clojure.spec.alpha/problems: [{:path [:block-name],
                                      :pred clojure.core/keyword?,
                                      :val 8,
                                      :via [],
                                      :in [0]}]
           clojure.spec.alpha/spec: #object[clojure.spec.alpha$regex_spec_impl$reify__2509 0x12a7b193 "clojure.spec.alpha$regex_spec_impl$reify__2509@12a7b193"]
          clojure.spec.alpha/value: (8
                                     [(0
                                       :vivid.art.cli/error
                                       {:step validate-delimiters,
                                        :message "Non-conformant delimiter specification: 'null'"})
                                      true])
    clojure.spec.test.alpha/caller: {:file "core.clj", :line 667, :var-scope clojure.core/apply}
     clojure.spec.test.alpha/spec-checking-fn/conform!                alpha.clj:  132
           clojure.spec.test.alpha/spec-checking-fn/fn                alpha.clj:  140
                                                   ...                               
             vivid.art.cli.delimiters-test/fn/fn/fn/fn      delimiters_test.clj:  142
                                                   ...                               
                                    clojure.core/apply                 core.clj:  667
                               farolero.core/signal/fn                core.cljc:  782
                                  farolero.core/signal                core.cljc:  775
                                  farolero.core/signal                core.cljc:  760
                                                   ...                               
           clojure.spec.test.alpha/spec-checking-fn/fn                alpha.clj:  142
                                                   ...                               
            vivid.art.cli.validate/validate-delimiters             validate.clj:   61
vivid.art.cli.delimiters-test/fn/fn/fn/expr-fn--auto--      delimiters_test.clj:  142
             vivid.art.cli.delimiters-test/fn/fn/fn/fn      delimiters_test.clj:  142
                vivid.art.cli.delimiters-test/fn/fn/fn      delimiters_test.clj:  142
                                                   ...                               
                                    clojure.core/apply                 core.clj:  665
                                  farolero.core/block*                core.cljc:   54
                                  farolero.core/block*                core.cljc:   42
                                                   ...                               
           clojure.spec.test.alpha/spec-checking-fn/fn                alpha.clj:  142
                                                   ...                               
                   vivid.art.cli.delimiters-test/fn/fn      delimiters_test.clj:  142
                      vivid.art.cli.delimiters-test/fn      delimiters_test.clj:  142
                              clojure.test/test-var/fn                 test.clj:  717
                                 clojure.test/test-var                 test.clj:  717
                         eftest.runner/test-vars/fn/fn               runner.clj:  102
                          clojure.test/default-fixture                 test.clj:  687
                            eftest.runner/test-vars/fn               runner.clj:   97
                 eftest.runner/wrap-test-with-timer/fn               runner.clj:   38
                             eftest.runner/pmap*/fn/fn               runner.clj:   71
                                                   ...                               
                                    clojure.core/apply                 core.clj:  665
                           clojure.core/with-bindings*                 core.clj: 1973 (repeats 2 times)
                                                   ...                               
               eftest.runner/bound-callback/reify/call               runner.clj:   54
                   java.util.concurrent.FutureTask.run          FutureTask.java:  266
     java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1149
    java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  624
                                  java.lang.Thread.run              Thread.java:  748

Lol, of course. Real sorry about this, I'm done for the evening, but I'll take care of this tomorrow and run some tests with instrumentation turned on to make sure I don't miss any more.

Alright, have a good evening, and thanks ^_^

@enspritz, sorry about the wait on that, I got everything completed yesterday but forgot to do a clojars deploy. I have 1.4.3 out on clojars, it had several fixes so that I could run the test suite with instrumentation turned on.

If everything is well then you should be able to work without any further issues, please let me know how it goes!

Thanks @IGJoshua , I confirmed it works perfectly, and we can close this issue. It's included in the ART 0.6.0 release, due imminently.

Of note, all of the performance and reflection warnings from prior 1.4 versions have disappeared, all but one:

Reflection warning, farolero/core.cljc:83:11 - reference to field incrementAndGet can't be resolved.

Oh, thanks for pointing that one out! That's new since 1.4.1. I'll fix that, but I'll leave it for now to see if anything else needs to be fixed before I push the next patch, since that one shouldn't cause too much issue.