ghostwheel

Hassle-free clojure.spec, automatic generative testing, side effect detection, and evaluation tracing for Clojure(-Script) – https://github.com/gnl/ghostwheel
tony.kay 2019-06-07T06:17:30.000900Z

@clojurians.net 0.3.9 cljs seems to not like multi-arity functions where one branch is var-args. This causes an infinite loop with 0.3.9, but works fine in 0.3.8:

tony.kay 2019-06-07T06:17:49.001200Z

(>defn assoc-aliased
  "Similar to clojure.core/assoc but works on UISM env and aliases."
  ([env alias new-value alias-2 value-2 & kv-pairs]
   [::env ::alias any? ::alias any? (s/* any?) => ::env]
   (apply set-aliased-value env alias new-value
     alias-2 value-2 kv-pairs))
  ([env alias new-value]
   [::env ::alias any? => ::env]
   (set-aliased-value env alias new-value)))

tony.kay 2019-06-07T06:25:14.001700Z

Let me clarify that: with outstrument true, it exhibits infinite recursion and blows the stack when you call it.

tony.kay 2019-06-07T06:26:29.002Z

{ :trace           0
 :trace-color     :violet
 :check           false
 :check-coverage  false
 :ignore-fx       false
 :num-tests       5
 :num-tests-ext   0
 :extensive-tests false
 :defn-macro      nil
 :instrument      false
 :outstrument     true
 :extrument       nil
 :expound         {:show-valid-values? true
                   :print-specs?       true}
 :report-output   :js-console}

gnl 2019-06-07T13:08:19.002100Z

Huh, thanks for letting me know. Dunno off the top of my head whether this is likely to be in Ghostwheel or in one of the updated dependencies (orchestra?) with 0.3.9, but I'll see about fixing it for 0.4.0 and adding a test for this specifically.

tony.kay 2019-06-07T15:19:28.002300Z

If you cannot easily reproduce I can point you at a git commit with instructions in Fulcro 3

gnl 2019-06-07T15:22:08.002500Z

I'll look into it later this evening or during the weekend before the release, but I'd bet money it's a change in the new version of orchestra, because I think that's the only change between 0.3.8 and 0.3.9 that could possibly explain this.

tony.kay 2019-06-07T15:22:26.002700Z

ah

gnl 2019-06-07T15:22:54.002900Z

And if it is, it'll be best to open an issue with orchestra with the expanded fspec

gnl 2019-06-07T15:22:58.003100Z

But let's confirm first

gnl 2019-06-07T15:23:16.003300Z

In the meantime you could try overriding the dependency in your build config with an older orchestra version

gnl 2019-06-07T15:23:20.003500Z

The one from 0.3.8

gnl 2019-06-07T15:23:39.003700Z

That'll probably be the quickest way to confirm actually

gnl 2019-06-07T15:23:43.003900Z

And you're already set up.

gnl 2019-06-07T15:24:20.004100Z

Oh, and does this work fine with ^::g/instrument, that is regular spec instrumentation?

gnl 2019-06-07T15:25:11.004400Z

There was however a reason I upgraded, wasn't just a routine thing, there were some other issues with the older one, will have to look at the history.

tony.kay 2019-06-07T15:33:42.004800Z

checking…

tony.kay 2019-06-07T15:37:31.005Z

confirmed…it is an orchestra issue.

gnl 2019-06-07T15:43:15.005200Z

Cool, could you macroexpand the >defn that does it and open an issue with orchestra with the corresponding plain-fdef+defn repro? Otherwise, I'll look into it over the next few days.

tony.kay 2019-06-07T15:43:40.005400Z

I’m trying to narrow it down…

gnl 2019-06-07T15:43:54.005600Z

+:thumbsup: Perfect, keep me posted.

tony.kay 2019-06-07T15:43:56.005800Z

making sure it isn’t a combination of cljs version etc

tony.kay 2019-06-07T15:44:05.006Z

https://github.com/jeaye/orchestra/issues/41

tony.kay 2019-06-07T15:45:28.006300Z

This looks suspiciously like my issue: https://clojure.atlassian.net/browse/CLJS-2995

tony.kay 2019-06-07T15:45:34.006500Z

but says it was fixed in latest cljs

tony.kay 2019-06-07T15:45:46.006700Z

except I’m not doing adv compile

tony.kay 2019-06-07T15:47:16.006900Z

but then it does not explain why dropping version of orchestra would do it…must be a bug there.

gnl 2019-06-07T15:49:17.007100Z

As Ben said in the issue you posted, lots of moving parts here

gnl 2019-06-07T15:51:07.007300Z

Let me know what you find out. If there's anything I can do on Ghostwheel's end I would, except probably downgrading dependencies, cause it was a bit of a pain to get everything working nicely together.

gnl 2019-06-07T15:51:58.007500Z

But good to know that downgrading orchestra is a possible workaround for this particular situation.

gnl 2019-06-07T15:59:23.007700Z

Oh, and I don't know if this is important information, but Ghostwheel currently explicitly depends on [org.clojure/spec.alpha "0.2.176"]

gnl 2019-06-07T15:59:45.007900Z

Which is also required by Clojure 1.10, but not 1.9

tony.kay 2019-06-07T16:00:18.008100Z

I’m using latest clj/cljs

1👍
gnl 2019-06-07T16:01:00.008400Z

Going offline now to focus, will check back later.

gnl 2019-06-07T16:01:02.008600Z

👋

tony.kay 2019-06-07T16:06:40.008800Z

thx

gnl 2019-06-07T13:08:19.002100Z

Huh, thanks for letting me know. Dunno off the top of my head whether this is likely to be in Ghostwheel or in one of the updated dependencies (orchestra?) with 0.3.9, but I'll see about fixing it for 0.4.0 and adding a test for this specifically.

tony.kay 2019-06-07T15:19:28.002300Z

If you cannot easily reproduce I can point you at a git commit with instructions in Fulcro 3

gnl 2019-06-07T15:22:08.002500Z

I'll look into it later this evening or during the weekend before the release, but I'd bet money it's a change in the new version of orchestra, because I think that's the only change between 0.3.8 and 0.3.9 that could possibly explain this.

tony.kay 2019-06-07T15:22:26.002700Z

ah

gnl 2019-06-07T15:22:54.002900Z

And if it is, it'll be best to open an issue with orchestra with the expanded fspec

gnl 2019-06-07T15:22:58.003100Z

But let's confirm first

gnl 2019-06-07T15:23:16.003300Z

In the meantime you could try overriding the dependency in your build config with an older orchestra version

gnl 2019-06-07T15:23:20.003500Z

The one from 0.3.8

gnl 2019-06-07T15:23:39.003700Z

That'll probably be the quickest way to confirm actually

gnl 2019-06-07T15:23:43.003900Z

And you're already set up.

gnl 2019-06-07T15:24:20.004100Z

Oh, and does this work fine with ^::g/instrument, that is regular spec instrumentation?

gnl 2019-06-07T15:25:11.004400Z

There was however a reason I upgraded, wasn't just a routine thing, there were some other issues with the older one, will have to look at the history.

tony.kay 2019-06-07T15:33:42.004800Z

checking…

tony.kay 2019-06-07T15:37:31.005Z

confirmed…it is an orchestra issue.

gnl 2019-06-07T15:43:15.005200Z

Cool, could you macroexpand the >defn that does it and open an issue with orchestra with the corresponding plain-fdef+defn repro? Otherwise, I'll look into it over the next few days.

tony.kay 2019-06-07T15:43:40.005400Z

I’m trying to narrow it down…

gnl 2019-06-07T15:43:54.005600Z

+:thumbsup: Perfect, keep me posted.

tony.kay 2019-06-07T15:43:56.005800Z

making sure it isn’t a combination of cljs version etc

tony.kay 2019-06-07T15:44:05.006Z

https://github.com/jeaye/orchestra/issues/41

tony.kay 2019-06-07T15:45:28.006300Z

This looks suspiciously like my issue: https://clojure.atlassian.net/browse/CLJS-2995

tony.kay 2019-06-07T15:45:34.006500Z

but says it was fixed in latest cljs

tony.kay 2019-06-07T15:45:46.006700Z

except I’m not doing adv compile

tony.kay 2019-06-07T15:47:16.006900Z

but then it does not explain why dropping version of orchestra would do it…must be a bug there.

gnl 2019-06-07T15:49:17.007100Z

As Ben said in the issue you posted, lots of moving parts here

gnl 2019-06-07T15:51:07.007300Z

Let me know what you find out. If there's anything I can do on Ghostwheel's end I would, except probably downgrading dependencies, cause it was a bit of a pain to get everything working nicely together.

gnl 2019-06-07T15:51:58.007500Z

But good to know that downgrading orchestra is a possible workaround for this particular situation.

gnl 2019-06-07T15:59:23.007700Z

Oh, and I don't know if this is important information, but Ghostwheel currently explicitly depends on [org.clojure/spec.alpha "0.2.176"]

gnl 2019-06-07T15:59:45.007900Z

Which is also required by Clojure 1.10, but not 1.9

tony.kay 2019-06-07T16:00:18.008100Z

I’m using latest clj/cljs

1👍
gnl 2019-06-07T16:01:00.008400Z

Going offline now to focus, will check back later.

gnl 2019-06-07T16:01:02.008600Z

👋

tony.kay 2019-06-07T16:06:40.008800Z

thx