ghostwheel 2019-06-07

@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:

(>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)))

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

{ :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}

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.

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

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.

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

But let's confirm first

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

The one from 0.3.8

That'll probably be the quickest way to confirm actually

And you're already set up.

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

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.

checking…

confirmed…it is an orchestra issue.

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.

I’m trying to narrow it down…

+👍 Perfect, keep me posted.

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

but says it was fixed in latest cljs

except I’m not doing adv compile

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

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

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.

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

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

Which is also required by Clojure 1.10, but not 1.9

I’m using latest clj/cljs

👍 1

Going offline now to focus, will check back later.