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

Non-conforming function call does not show reason #20

Open
majnu opened this issue Feb 19, 2019 · 5 comments
Open

Non-conforming function call does not show reason #20

majnu opened this issue Feb 19, 2019 · 5 comments
Assignees
Milestone

Comments

@majnu
Copy link

majnu commented Feb 19, 2019

Wow, ghostwheel is really great, thanks!

One thing that I don't get to work is this:

(>defn add-positives
  [a b]
  [pos-int? pos-int? => int?]
  (+ a b))

Calling (add-positives -1 1) rightfully detects a non-conforming argument, but does not show which argument did not conform and why:

Error: Call to #'shadow-cljs-browser-template.core/add-positives did not conform to spec.
    at new cljs$core$ExceptionInfo (http://localhost:8080/cljs-runtime/cljs.core.js:37198:10)
    at Function.cljs$core$IFn$_invoke$arity$3 (http://localhost:8080/cljs-runtime/cljs.core.js:37259:9)
    at Function.cljs$core$IFn$_invoke$arity$2 (http://localhost:8080/cljs-runtime/cljs.core.js:37255:26)
    at http://localhost:8080/cljs-runtime/cljs.spec.test.alpha.js:140:25
    at http://localhost:8080/cljs-runtime/cljs.spec.test.alpha.js:170:8
    at G__48736__delegate (http://localhost:8080/cljs-runtime/cljs.spec.test.alpha.js:180:5)
    at G__48736 (http://localhost:8080/cljs-runtime/cljs.spec.test.alpha.js:200:27)
    at eval (eval at <anonymous> (http://localhost:8080/cljs-runtime/shadow.cljs.devtools.client.browser.js:823:8), <anonymous>:1:49)
    at http://localhost:8080/cljs-runtime/shadow.cljs.devtools.client.browser.js:823:8
    at Object.shadow$cljs$devtools$client$env$repl_call [as repl_call] (http://localhost:8080/cljs-runtime/shadow.cljs.devtools.client.env.js:141:108)

My namespace is declared like this:

(ns shadow-cljs-browser-template.core
  #:ghostwheel.core{:check     true
                    :num-tests 10
                    :instrument true
                    }
  (:require
    [ghostwheel.core :as g :refer [>defn >defn- >fdef => | <- ?]]
    [ghostwheel.tracer]
    [clojure.pprint :as pp]))

Am I missing something?

@gnl
Copy link
Owner

gnl commented Mar 12, 2019

I can reproduce this. I'm just tweaking a few things to make Ghostwheel play nice with the newest versions of Shadow CLJS and Figwheel and will look into this in the process.

@gnl
Copy link
Owner

gnl commented Mar 12, 2019

P.S. In the meantime you can see the raw error including all relevant details in the JS console.

@gnl gnl self-assigned this Mar 12, 2019
@majnu
Copy link
Author

majnu commented Mar 13, 2019

Great thanks! I am indeed having some more issues with ghostwheel and shadowCLJS. Will wait for that update before I try again.

@gnl gnl added this to the 0.4.0 milestone Jun 14, 2019
@gnl
Copy link
Owner

gnl commented May 21, 2020

👋 Hi. I'm posting this same comment to all issue threads to just give a quick heads up that the project, despite rumours and some evidence to the contrary, is not dead. It was hibernating for a little while and now nearing the long-awaited next release, which will fix some long-standing issues (and introduce some breaking changes to the config).

I'll be reviewing all open issues and PRs over the next couple of weeks, so stay tuned and thanks for the patience.

See also this Slack thread

@gnl
Copy link
Owner

gnl commented Jul 20, 2023

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

2 participants