cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
mfikes 2019-08-12T00:04:20.088100Z

@dnolen I found the commit that eliminates the .call that appears to matter to Hoplon. https://clojure.atlassian.net/browse/CLJS-3157 has a minimal example insofar as illustrating that the .call goes away, but unfortunately the repro does not yet include an example of this causing a runtime problem. (I'm wondering if there is a simpler minimal repro that doesn't involve the SVGElement, etc.)

mfikes 2019-08-12T00:23:01.089900Z

I think this is why .call works for SVGElements in Hoplon, and why things break if it is removed https://github.com/hoplon/hoplon/blob/1e73edf7c6e56a4c17a0830cb7f3433cdb039c26/src/hoplon/core.cljs#L460 Gah. I suppose all bets are off and static reasoning may not apply in this case. 😞

mfikes 2019-08-12T00:37:36.090600Z

Given, this, a minimal repro could be that this code used to work:

cljs.user=> (extend-type js/Element IFn (-invoke ([_] :you-rang?)))
#object[Function]
cljs.user=> ((.-body js/document))
:you-rang?

dnolen 2019-08-12T17:44:44.091200Z

@mfikes so that's the real problem

dnolen 2019-08-12T17:44:49.091400Z

it is in fact js

dnolen 2019-08-12T17:45:05.091800Z

I suspected the problem was something like this

dnolen 2019-08-12T17:47:21.092800Z

@thheller ^ probably means we need to back out that enhancement for now until we have better ideas

thheller 2019-08-12T17:48:30.093200Z

hmm yeah I ran into similar issues when I experimented with https://clojure.atlassian.net/browse/CLJS-3002

thheller 2019-08-12T17:49:04.093700Z

maybe worth adding a "new" ^fn annotation or so though since this should still be possible IMHO

thheller 2019-08-12T17:49:05.093900Z

https://clojure.atlassian.net/browse/CLJS-3071

dnolen 2019-08-12T17:50:05.094500Z

right that's one idea - but going to park this for now - needs to be stewed on

thheller 2019-08-12T17:50:39.094900Z

yeah agreed IFn makes this complicated

dnolen 2019-08-12T17:51:33.095200Z

@mfikes backed out that change, let me know if Canary looks better

dnolen 2019-08-12T20:53:50.095800Z

great!