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

I can't for the life of me figure out how to get tracing to work #30

Open
saikyun opened this issue Nov 22, 2019 · 2 comments
Open

I can't for the life of me figure out how to get tracing to work #30

saikyun opened this issue Nov 22, 2019 · 2 comments

Comments

@saikyun
Copy link

saikyun commented Nov 22, 2019

With this code:

(ns showcase.ghostwheel
  (:require
   [ghostwheel.tracer]
   [ghostwheel.core :as g :refer [>defn | =>]]))

(>defn ^::g/trace ranged-rand
  "I was lifted straight from the clojure.spec guide"
  [start end]
  [int? int? | #(< start end)
   => int? | #(>= % start) #(< % end)]
  (+ start (long (rand (- end start)))))

(g/check)

And the following in my shadow-cljs.edn:

{:compiler-options
  :ghostwheel 
  {:check true 
   :num-tests 10 
   :outstrument true
   :report-output :repl}}

The automatic tests works great! So thanks for that.

However, I can't figure out how to get tracing to work. Am I missing anything?

In the readme, there's an example that looks like this:

(g/check #(foo 2 4))

But when I try similar code, I get a spec error, saying that g/check won't take that input.

@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