clojure.lang.ExceptionInfo: Call to clojure.core/defn did not conform to spec: :clojure.spec/args (completions* "Return a sequence of matching completions given a prefix string \n and an optional current namespace." ([prefix] (completions* prefix *ns*)) ([prefix ns & {:keys #{filter}, :or {filter ccw.debug.serverrepl/starts-with-filter}}] (for [[kind completions] (potential-completions prefix ns) [match-symbol match-object :as completion] completions :let [f (filter-completion (name match-symbol) prefix filter)] :when f] {:kind kind, :completion match-symbol, :match match-object, :filter f}))) #:clojure.spec{:args (completions* "Return a sequence of matching completions given a prefix string \n and an optional current namespace." ([prefix] (completions* prefix *ns*)) ([prefix ns & {:keys #{filter}, :or {filter ccw.debug.serverrepl/starts-with-filter}}] (for [[kind completions] (potential-completions prefix ns) [match-symbol match-object :as completion] completions :let [f (filter-completion (name match-symbol) prefix filter)] :when f] {:kind kind, :completion match-symbol, :match match-object, :filter f})))}, compiling:(ccw/debug/serverrepl.clj:443:1)

Google Groups | Alex Miller | 2 months ago
  1. 0

    [ANN] Clojure 1.9.0-alpha13

    Google Groups | 2 months ago | Alex Miller
    clojure.lang.ExceptionInfo: Call to clojure.core/defn did not conform to spec: :clojure.spec/args (completions* "Return a sequence of matching completions given a prefix string \n and an optional current namespace." ([prefix] (completions* prefix *ns*)) ([prefix ns & {:keys #{filter}, :or {filter ccw.debug.serverrepl/starts-with-filter}}] (for [[kind completions] (potential-completions prefix ns) [match-symbol match-object :as completion] completions :let [f (filter-completion (name match-symbol) prefix filter)] :when f] {:kind kind, :completion match-symbol, :match match-object, :filter f}))) #:clojure.spec{:args (completions* "Return a sequence of matching completions given a prefix string \n and an optional current namespace." ([prefix] (completions* prefix *ns*)) ([prefix ns & {:keys #{filter}, :or {filter ccw.debug.serverrepl/starts-with-filter}}] (for [[kind completions] (potential-completions prefix ns) [match-symbol match-object :as completion] completions :let [f (filter-completion (name match-symbol) prefix filter)] :when f] {:kind kind, :completion match-symbol, :match match-object, :filter f})))}, compiling:(ccw/debug/serverrepl.clj:443:1)
  2. 0

    Compiler errors if emacs tmp files exist in shadow build dir

    GitHub | 2 years ago | lsnape
    clojure.lang.ExceptionInfo: Error in component :cljs-compiler in system com.stuartsierra.component.SystemMap calling #'com.stuartsierra.component/start {:reason :com.stuartsierra.component/component-function-threw-exception, :function #'com.stuartsierra.component/start, :system-key :cljs-compiler, :component #phoenix.modules.cljs.CLJSCompiler{:output-dir "target/resources/js/", :modules [{:name :main, :mains #{test-brepl.ui.app}, :dependencies nil}], :source-path "ui-src", :web-context-path "/js", :resource-prefix "js"}, :system #<SystemMap>}, compiling:(/private/var/folders/t3/v7srlkk121v9492zsnydvq0w0000gq/T/form-init4062606913271261954.clj:1:124)
  3. 0

    When fixing an issue in ring-middleware I noticed schema.test/validate-schemas not working correctly. [~nathaniel] has also seen this behavior in other test namespaces. It should be noted that I've seen this work in the test namespace that caught the ring-middleware regression: [pe-puppet-server-extensions#2016.2.x/tests/i/p/e/s/r/reversy_proxy_ca_service_test.clj|https://github.com/puppetlabs/pe-puppet-server-extensions/blob/2016.2.x/test/integration/puppetlabs/enterprise/services/reverse_proxy/reverse_proxy_ca_service_test.clj#L56]. I currently have a strong need to just use {{^:always-validate}} at the function definition and move on (which seems to work), but we may want have a further investigation to see if there are edge cases where schema doesn't validate when we believe it to be validating. A reproduction taken from the ring-middleware Pull Request is below: {code} Here is an example of re-introducing the regression and then attempting to force schema validation through other means than ^:always-validate: 10:34:17 hobo:ring-middleware justin (maint-wrap-proxy-schema %) ‖ vim src/puppetlabs/ring_middleware/core.clj 10:34:37 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ git diff src/ diff --git a/src/puppetlabs/ring_middleware/core.clj b/src/puppetlabs/ring_middleware/core.clj index f2d258f..b4d2817 100644 --- a/src/puppetlabs/ring_middleware/core.clj +++ b/src/puppetlabs/ring_middleware/core.clj @@ -135,11 +135,11 @@ (log/trace "Computed response:" resp) resp))) -(schema/defn ^:always-validate wrap-proxy :- IFn +(schema/defn wrap-proxy :- IFn "Proxies requests to proxied-path, a local URI, to the remote URI at remote-uri-base, also a string." [handler :- IFn - proxied-path :- (schema/either Pattern schema/Str) + proxied-path :- (schema/enum Pattern schema/Str) remote-uri-base :- schema/Str & [http-opts]] (let [proxied-path (if (instance? Pattern proxied-path) 10:34:53 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ lein test :only puppetlabs.ring-middleware.core-test/test-proxy lein test puppetlabs.ring-middleware.core-test 2016-05-10 10:35:26,924 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@3826510a{/,null,null} contextPath ends with / 2016-05-10 10:35:27,478 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@51d14a8a{/,null,null} contextPath ends with / 2016-05-10 10:35:27,985 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@39d0670c{/,null,null} contextPath ends with / 2016-05-10 10:35:28,359 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@428ebfde{/,null,null} contextPath ends with / 2016-05-10 10:35:28,755 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@30625f51{/,null,null} contextPath ends with / 2016-05-10 10:35:28,883 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@2058633e{/,null,null} contextPath ends with / 2016-05-10 10:35:28,981 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@4a796b3e{/,null,null} contextPath ends with / 2016-05-10 10:35:29,071 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@582fd243{/,null,null} contextPath ends with / 2016-05-10 10:35:29,172 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@3384002c{/,null,null} contextPath ends with / 2016-05-10 10:35:29,269 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@6d1cf84c{/,null,null} contextPath ends with / 2016-05-10 10:35:29,407 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@6f10b857{/,null,null} contextPath ends with / 2016-05-10 10:35:29,508 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@6a0f2971{/,null,null} contextPath ends with / 2016-05-10 10:35:29,602 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@393d64d2{/,null,null} contextPath ends with / 2016-05-10 10:35:29,686 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@5e250a1a{/,null,null} contextPath ends with / Ran 1 tests containing 61 assertions. 0 failures, 0 errors. 10:36:57 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ vim test/puppetlabs/ring_middleware/core_test.clj 10:37:21 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ git diff test/ diff --git a/test/puppetlabs/ring_middleware/core_test.clj b/test/puppetlabs/ring_middleware/core_test.clj index a78d02e..1b91bcf 100644 --- a/test/puppetlabs/ring_middleware/core_test.clj +++ b/test/puppetlabs/ring_middleware/core_test.clj @@ -14,12 +14,14 @@ [puppetlabs.trapperkeeper.testutils.logging :as logutils] [ring.util.response :as rr] [schema.core :as schema] + [schema.test :as schema-test] [slingshot.slingshot :as slingshot])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Testing Helpers +(use-fixtures :once schema-test/validate-schemas) (def WackSchema [schema/Str]) 10:37:24 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ lein test :only puppetlabs.ring-middleware.core-test/test-proxy lein test puppetlabs.ring-middleware.core-test 2016-05-10 10:37:43,933 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@67485f3c{/,null,null} contextPath ends with / 2016-05-10 10:37:44,546 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@516a97eb{/,null,null} contextPath ends with / 2016-05-10 10:37:45,088 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@5f41e81d{/,null,null} contextPath ends with / 2016-05-10 10:37:45,429 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@6e0bfba8{/,null,null} contextPath ends with / 2016-05-10 10:37:45,837 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@7630471{/,null,null} contextPath ends with / 2016-05-10 10:37:45,969 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@7453fdf5{/,null,null} contextPath ends with / 2016-05-10 10:37:46,070 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@2b6c5c75{/,null,null} contextPath ends with / 2016-05-10 10:37:46,165 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@1bdfa51f{/,null,null} contextPath ends with / 2016-05-10 10:37:46,274 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@2b58ca9c{/,null,null} contextPath ends with / 2016-05-10 10:37:46,378 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@589b08df{/,null,null} contextPath ends with / 2016-05-10 10:37:46,503 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@54fc186f{/,null,null} contextPath ends with / 2016-05-10 10:37:46,610 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@75751baf{/,null,null} contextPath ends with / 2016-05-10 10:37:46,713 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@4c724636{/,null,null} contextPath ends with / 2016-05-10 10:37:46,807 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@18315379{/,null,null} contextPath ends with / Ran 1 tests containing 61 assertions. 0 failures, 0 errors. 10:38:33 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ vim test/puppetlabs/ring_middleware/core_test.clj 10:40:30 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ git diff test/ diff --git a/test/puppetlabs/ring_middleware/core_test.clj b/test/puppetlabs/ring_middleware/core_test.clj index a78d02e..d7afd67 100644 --- a/test/puppetlabs/ring_middleware/core_test.clj +++ b/test/puppetlabs/ring_middleware/core_test.clj @@ -14,12 +14,14 @@ [puppetlabs.trapperkeeper.testutils.logging :as logutils] [ring.util.response :as rr] [schema.core :as schema] + [schema.test :as schema-test] [slingshot.slingshot :as slingshot])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Testing Helpers +(schema/set-fn-validation! true) (def WackSchema [schema/Str]) 10:40:33 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ lein test :only puppetlabs.ring-middleware.core-test/test-proxy Exception in thread "main" clojure.lang.ExceptionInfo: Input to wrap-proxy does not match schema: [nil (named (not (#{java.util.regex.Pattern java.lang.String} "/hello-proxy")) proxied-path) nil] {:type : schema.core/error, :schema [#schema.core.One{:schema clojure.lang.IFn, :optional? false, :name handler} #schema.core.One{:schema (enum java.util.regex.Pattern java.lang.String), :optional? false, :name pr oxied-path} #schema.core.One{:schema java.lang.String, :optional? false, :name remote-uri-base} #schema.core.One{:schema Any, :optional? true, :name http-opts}], :value (#object[puppetlabs.ring_middleware .core_test$proxy_error_handler 0x2fc21fab "puppetlabs.ring_middleware.core_test$proxy_error_handler@2fc21fab"] "/hello-proxy" "http://localhost:9000/hello"), :error [nil (named (not (#{java.util.regex.Pat tern java.lang.String} "/hello-proxy")) proxied-path) nil]}, compiling:(core_test.clj:95:7) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3628) at clojure.lang.Compiler$DefExpr.eval(Compiler.java:439) at clojure.lang.Compiler.eval(Compiler.java:6787) at clojure.lang.Compiler.load(Compiler.java:7227) ...snip... at puppetlabs.ring_middleware.core$eval8368$wrap_proxy__8373.doInvoke(core.clj:138) at clojure.lang.RestFn.invoke(RestFn.java:445) at clojure.lang.AFn.applyToHelper(AFn.java:160) at clojure.lang.RestFn.applyTo(RestFn.java:132) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3623) ... 36 more Tests failed. {code}

    JIRA | 7 months ago | Justin Stoller
    clojure.lang.ExceptionInfo: Input to wrap-proxy does not match schema: [nil (named (not (#{java.util.regex.Pattern java.lang.String} "/hello-proxy")) proxied-path) nil] {:type : schema.core/error, :schema [#schema.core.One{:schema clojure.lang.IFn, :optional? false, :name handler} #schema.core.One{:schema (enum java.util.regex.Pattern java.lang.String), :optional? false, :name pr oxied-path} #schema.core.One{:schema java.lang.String, :optional? false, :name remote-uri-base} #schema.core.One{:schema Any, :optional? true, :name http-opts}], :value (#object[puppetlabs.ring_middleware .core_test$proxy_error_handler 0x2fc21fab "puppetlabs.ring_middleware.core_test$proxy_error_handler@2fc21fab"] "/hello-proxy" "http://localhost:9000/hello"), :error [nil (named (not (#{java.util.regex.Pat tern java.lang.String} "/hello-proxy")) proxied-path) nil]}, compiling:(core_test.clj:95:7)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When fixing an issue in ring-middleware I noticed schema.test/validate-schemas not working correctly. [~nathaniel] has also seen this behavior in other test namespaces. It should be noted that I've seen this work in the test namespace that caught the ring-middleware regression: [pe-puppet-server-extensions#2016.2.x/tests/i/p/e/s/r/reversy_proxy_ca_service_test.clj|https://github.com/puppetlabs/pe-puppet-server-extensions/blob/2016.2.x/test/integration/puppetlabs/enterprise/services/reverse_proxy/reverse_proxy_ca_service_test.clj#L56]. I currently have a strong need to just use {{^:always-validate}} at the function definition and move on (which seems to work), but we may want have a further investigation to see if there are edge cases where schema doesn't validate when we believe it to be validating. A reproduction taken from the ring-middleware Pull Request is below: {code} Here is an example of re-introducing the regression and then attempting to force schema validation through other means than ^:always-validate: 10:34:17 hobo:ring-middleware justin (maint-wrap-proxy-schema %) ‖ vim src/puppetlabs/ring_middleware/core.clj 10:34:37 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ git diff src/ diff --git a/src/puppetlabs/ring_middleware/core.clj b/src/puppetlabs/ring_middleware/core.clj index f2d258f..b4d2817 100644 --- a/src/puppetlabs/ring_middleware/core.clj +++ b/src/puppetlabs/ring_middleware/core.clj @@ -135,11 +135,11 @@ (log/trace "Computed response:" resp) resp))) -(schema/defn ^:always-validate wrap-proxy :- IFn +(schema/defn wrap-proxy :- IFn "Proxies requests to proxied-path, a local URI, to the remote URI at remote-uri-base, also a string." [handler :- IFn - proxied-path :- (schema/either Pattern schema/Str) + proxied-path :- (schema/enum Pattern schema/Str) remote-uri-base :- schema/Str & [http-opts]] (let [proxied-path (if (instance? Pattern proxied-path) 10:34:53 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ lein test :only puppetlabs.ring-middleware.core-test/test-proxy lein test puppetlabs.ring-middleware.core-test 2016-05-10 10:35:26,924 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@3826510a{/,null,null} contextPath ends with / 2016-05-10 10:35:27,478 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@51d14a8a{/,null,null} contextPath ends with / 2016-05-10 10:35:27,985 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@39d0670c{/,null,null} contextPath ends with / 2016-05-10 10:35:28,359 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@428ebfde{/,null,null} contextPath ends with / 2016-05-10 10:35:28,755 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@30625f51{/,null,null} contextPath ends with / 2016-05-10 10:35:28,883 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@2058633e{/,null,null} contextPath ends with / 2016-05-10 10:35:28,981 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@4a796b3e{/,null,null} contextPath ends with / 2016-05-10 10:35:29,071 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@582fd243{/,null,null} contextPath ends with / 2016-05-10 10:35:29,172 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@3384002c{/,null,null} contextPath ends with / 2016-05-10 10:35:29,269 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@6d1cf84c{/,null,null} contextPath ends with / 2016-05-10 10:35:29,407 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@6f10b857{/,null,null} contextPath ends with / 2016-05-10 10:35:29,508 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@6a0f2971{/,null,null} contextPath ends with / 2016-05-10 10:35:29,602 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@393d64d2{/,null,null} contextPath ends with / 2016-05-10 10:35:29,686 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@5e250a1a{/,null,null} contextPath ends with / Ran 1 tests containing 61 assertions. 0 failures, 0 errors. 10:36:57 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ vim test/puppetlabs/ring_middleware/core_test.clj 10:37:21 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ git diff test/ diff --git a/test/puppetlabs/ring_middleware/core_test.clj b/test/puppetlabs/ring_middleware/core_test.clj index a78d02e..1b91bcf 100644 --- a/test/puppetlabs/ring_middleware/core_test.clj +++ b/test/puppetlabs/ring_middleware/core_test.clj @@ -14,12 +14,14 @@ [puppetlabs.trapperkeeper.testutils.logging :as logutils] [ring.util.response :as rr] [schema.core :as schema] + [schema.test :as schema-test] [slingshot.slingshot :as slingshot])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Testing Helpers +(use-fixtures :once schema-test/validate-schemas) (def WackSchema [schema/Str]) 10:37:24 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ lein test :only puppetlabs.ring-middleware.core-test/test-proxy lein test puppetlabs.ring-middleware.core-test 2016-05-10 10:37:43,933 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@67485f3c{/,null,null} contextPath ends with / 2016-05-10 10:37:44,546 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@516a97eb{/,null,null} contextPath ends with / 2016-05-10 10:37:45,088 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@5f41e81d{/,null,null} contextPath ends with / 2016-05-10 10:37:45,429 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@6e0bfba8{/,null,null} contextPath ends with / 2016-05-10 10:37:45,837 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@7630471{/,null,null} contextPath ends with / 2016-05-10 10:37:45,969 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@7453fdf5{/,null,null} contextPath ends with / 2016-05-10 10:37:46,070 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@2b6c5c75{/,null,null} contextPath ends with / 2016-05-10 10:37:46,165 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@1bdfa51f{/,null,null} contextPath ends with / 2016-05-10 10:37:46,274 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@2b58ca9c{/,null,null} contextPath ends with / 2016-05-10 10:37:46,378 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@589b08df{/,null,null} contextPath ends with / 2016-05-10 10:37:46,503 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@54fc186f{/,null,null} contextPath ends with / 2016-05-10 10:37:46,610 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@75751baf{/,null,null} contextPath ends with / 2016-05-10 10:37:46,713 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@4c724636{/,null,null} contextPath ends with / 2016-05-10 10:37:46,807 WARN [o.e.j.s.h.ContextHandler] o.e.j.s.h.ContextHandler@18315379{/,null,null} contextPath ends with / Ran 1 tests containing 61 assertions. 0 failures, 0 errors. 10:38:33 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ vim test/puppetlabs/ring_middleware/core_test.clj 10:40:30 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ git diff test/ diff --git a/test/puppetlabs/ring_middleware/core_test.clj b/test/puppetlabs/ring_middleware/core_test.clj index a78d02e..d7afd67 100644 --- a/test/puppetlabs/ring_middleware/core_test.clj +++ b/test/puppetlabs/ring_middleware/core_test.clj @@ -14,12 +14,14 @@ [puppetlabs.trapperkeeper.testutils.logging :as logutils] [ring.util.response :as rr] [schema.core :as schema] + [schema.test :as schema-test] [slingshot.slingshot :as slingshot])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; Testing Helpers +(schema/set-fn-validation! true) (def WackSchema [schema/Str]) 10:40:33 hobo:ring-middleware justin (maint-wrap-proxy-schema *%) ‖ lein test :only puppetlabs.ring-middleware.core-test/test-proxy Exception in thread "main" clojure.lang.ExceptionInfo: Input to wrap-proxy does not match schema: [nil (named (not (#{java.util.regex.Pattern java.lang.String} "/hello-proxy")) proxied-path) nil] {:type : schema.core/error, :schema [#schema.core.One{:schema clojure.lang.IFn, :optional? false, :name handler} #schema.core.One{:schema (enum java.util.regex.Pattern java.lang.String), :optional? false, :name pr oxied-path} #schema.core.One{:schema java.lang.String, :optional? false, :name remote-uri-base} #schema.core.One{:schema Any, :optional? true, :name http-opts}], :value (#object[puppetlabs.ring_middleware .core_test$proxy_error_handler 0x2fc21fab "puppetlabs.ring_middleware.core_test$proxy_error_handler@2fc21fab"] "/hello-proxy" "http://localhost:9000/hello"), :error [nil (named (not (#{java.util.regex.Pat tern java.lang.String} "/hello-proxy")) proxied-path) nil]}, compiling:(core_test.clj:95:7) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3628) at clojure.lang.Compiler$DefExpr.eval(Compiler.java:439) at clojure.lang.Compiler.eval(Compiler.java:6787) at clojure.lang.Compiler.load(Compiler.java:7227) ...snip... at puppetlabs.ring_middleware.core$eval8368$wrap_proxy__8373.doInvoke(core.clj:138) at clojure.lang.RestFn.invoke(RestFn.java:445) at clojure.lang.AFn.applyToHelper(AFn.java:160) at clojure.lang.RestFn.applyTo(RestFn.java:132) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3623) ... 36 more Tests failed. {code}

    JIRA | 7 months ago | Justin Stoller
    clojure.lang.ExceptionInfo: Input to wrap-proxy does not match schema: [nil (named (not (#{java.util.regex.Pattern java.lang.String} "/hello-proxy")) proxied-path) nil] {:type : schema.core/error, :schema [#schema.core.One{:schema clojure.lang.IFn, :optional? false, :name handler} #schema.core.One{:schema (enum java.util.regex.Pattern java.lang.String), :optional? false, :name pr oxied-path} #schema.core.One{:schema java.lang.String, :optional? false, :name remote-uri-base} #schema.core.One{:schema Any, :optional? true, :name http-opts}], :value (#object[puppetlabs.ring_middleware .core_test$proxy_error_handler 0x2fc21fab "puppetlabs.ring_middleware.core_test$proxy_error_handler@2fc21fab"] "/hello-proxy" "http://localhost:9000/hello"), :error [nil (named (not (#{java.util.regex.Pat tern java.lang.String} "/hello-proxy")) proxied-path) nil]}, compiling:(core_test.clj:95:7)
  6. 0

    Carmine throws exception on Redis cluster MOVED response

    GitHub | 1 year ago | CVTJNII
    clojure.lang.ExceptionInfo: MOVED 9102 192.168.253.131:6379 {:prefix :moved}

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. clojure.lang.ExceptionInfo

      Call to clojure.core/defn did not conform to spec: :clojure.spec/args (completions* "Return a sequence of matching completions given a prefix string \n and an optional current namespace." ([prefix] (completions* prefix *ns*)) ([prefix ns & {:keys #{filter}, :or {filter ccw.debug.serverrepl/starts-with-filter}}] (for [[kind completions] (potential-completions prefix ns) [match-symbol match-object :as completion] completions :let [f (filter-completion (name match-symbol) prefix filter)] :when f] {:kind kind, :completion match-symbol, :match match-object, :filter f}))) #:clojure.spec{:args (completions* "Return a sequence of matching completions given a prefix string \n and an optional current namespace." ([prefix] (completions* prefix *ns*)) ([prefix ns & {:keys #{filter}, :or {filter ccw.debug.serverrepl/starts-with-filter}}] (for [[kind completions] (potential-completions prefix ns) [match-symbol match-object :as completion] completions :let [f (filter-completion (name match-symbol) prefix filter)] :when f] {:kind kind, :completion match-symbol, :match match-object, :filter f})))}, compiling:(ccw/debug/serverrepl.clj:443:1)

      at clojure.lang.Compiler.load()
    2. Clojure
      Compiler.load
      1. clojure.lang.Compiler.load(Compiler.java:7441)
      1 frame