figwheel-main

figwheel-main http://figwheel.org
bhauman 2020-04-26T15:48:36.070800Z

@dnolen so the compiler is hanging when I have figwheel.core in the :preloads . figwheel.core is a cljc file. I am thinking that there is a recursive loading problem of some sort happening.

bhauman 2020-04-26T15:49:04.071600Z

Looking to see if there is an obvious reason in the requires

dnolen 2020-04-26T15:49:08.071700Z

we didn't change anything around loading or preloads that I'm aware of

dnolen 2020-04-26T15:49:44.072300Z

I mean I didn't myself

dnolen 2020-04-26T15:49:59.072900Z

it's possible there's another patch or something - but I really don't remember seeing anything along those lines

bhauman 2020-04-26T15:51:11.074300Z

I’ll take a look.

dnolen 2020-04-26T15:52:36.074900Z

@bhauman https://www.baeldung.com/java-thread-dump

dnolen 2020-04-26T15:52:48.075500Z

this would at least tell you where in the compiler it's stuck

bhauman 2020-04-26T15:54:09.075800Z

@dnolen thanks I’ll give it a try

bhauman 2020-04-26T15:59:35.076100Z

@dnolen yeah it looks like its in the analyzer

bhauman 2020-04-26T15:59:51.076400Z

java.lang.Thread.State: RUNNABLE
	at clojure.core$deref.invokeStatic(core.clj:2312)
	at clojure.core$deref.invoke(core.clj:2298)
	at cljs.analyzer$resolve_var.invokeStatic(analyzer.cljc:1260)
	at cljs.analyzer$resolve_var.invoke(analyzer.cljc:1181)
	at cljs.analyzer$resolve_var.invokeStatic(analyzer.cljc:1241)
	at cljs.analyzer$resolve_var.invoke(analyzer.cljc:1181)
	at cljs.analyzer$resolve_var.invokeStatic(analyzer.cljc:1187)
	at cljs.analyzer$resolve_var.invoke(analyzer.cljc:1181)
	at cljs.analyzer$resolve_existing_var.invokeStatic(analyzer.cljc:1298)
	at cljs.analyzer$resolve_existing_var.invoke(analyzer.cljc:1293)
	at cljs.analyzer$analyze_symbol.invokeStatic(analyzer.cljc:3788)
	at cljs.analyzer$analyze_symbol.invoke(analyzer.cljc:3752)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:4182)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:4180)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4236)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:4228)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4256)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4249)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4247)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$parse_invoke_STAR_$ana_expr__2577.invoke(analyzer.cljc:3710)
	at clojure.core$mapv$fn__8088.invoke(core.clj:6832)
	at clojure.lang.PersistentList.reduce(PersistentList.java:141)
	at clojure.core$reduce.invokeStatic(core.clj:6747)
	at clojure.core$mapv.invokeStatic(core.clj:6823)
	at clojure.core$mapv.invoke(core.clj:6823)
	at cljs.analyzer$parse_invoke_STAR_.invokeStatic(analyzer.cljc:3711)
	at cljs.analyzer$parse_invoke_STAR_.invoke(analyzer.cljc:3657)
	at cljs.analyzer$parse_invoke.invokeStatic(analyzer.cljc:3723)
	at cljs.analyzer$parse_invoke.invoke(analyzer.cljc:3721)
	at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3968)
	at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3965)
	at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3972)
	at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3970)
	at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3996)
	at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3974)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:4183)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:4180)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4236)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:4228)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4256)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4249)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4247)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$fn__1832$fn__1834.invoke(analyzer.cljc:1676)
	at cljs.analyzer$fn__1832.invokeStatic(analyzer.cljc:1676)
	at cljs.analyzer$fn__1832.invoke(analyzer.cljc:1670)
	at clojure.lang.MultiFn.invoke(MultiFn.java:251)
	at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3967)
	at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3965)
	at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3972)
	at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3970)
	at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3996)
	at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3974)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:4183)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:4180)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4236)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:4228)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4256)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3997)
	at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3974)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:4183)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:4180)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4236)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:4228)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4256)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4249)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4247)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze_do_statements_STAR_$fn__2020.invoke(analyzer.cljc:2267)
	at clojure.core$mapv$fn__8088.invoke(core.clj:6832)
	at clojure.lang.ArrayChunk.reduce(ArrayChunk.java:58)
	at clojure.core.protocols$fn__7847.invokeStatic(protocols.clj:136)
	at clojure.core.protocols$fn__7847.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__7807$G__7802__7816.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__7833.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__7833.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__7781$G__7776__7794.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6748)
	at clojure.core$mapv.invokeStatic(core.clj:6823)
	at clojure.core$mapv.invoke(core.clj:6823)
	at cljs.analyzer$analyze_do_statements_STAR_.invokeStatic(analyzer.cljc:2267)
	at cljs.analyzer$analyze_do_statements_STAR_.invoke(analyzer.cljc:2266)
	at cljs.analyzer$analyze_do_statements.invokeStatic(analyzer.cljc:2270)
	at cljs.analyzer$analyze_do_statements.invoke(analyzer.cljc:2269)
	at cljs.analyzer$fn__2025.invokeStatic(analyzer.cljc:2274)
	at cljs.analyzer$fn__2025.invoke(analyzer.cljc:2272)
	at clojure.lang.MultiFn.invoke(MultiFn.java:251)
	at cljs.analyzer$analyze_seq_STAR_.invokeStatic(analyzer.cljc:3967)
	at cljs.analyzer$analyze_seq_STAR_.invoke(analyzer.cljc:3965)
	at cljs.analyzer$analyze_seq_STAR__wrap.invokeStatic(analyzer.cljc:3972)
	at cljs.analyzer$analyze_seq_STAR__wrap.invoke(analyzer.cljc:3970)
	at cljs.analyzer$analyze_seq.invokeStatic(analyzer.cljc:3996)
	at cljs.analyzer$analyze_seq.invoke(analyzer.cljc:3974)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:4183)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:4180)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4236)
	at cljs.analyzer$analyze_STAR_.invoke(analyzer.cljc:4228)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4256)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4249)
	at cljs.analyzer$analyze.invoke(analyzer.cljc:4239)
	at cljs.analyzer$analyze.invokeStatic(analyzer.cljc:4247)
	at cljs.analyzer$analyze.invo

bhauman 2020-04-26T16:00:54.076600Z

yeah and its still running

bhauman 2020-04-26T16:00:59.076900Z

at clojure.lang.PersistentHashMap.valAt(PersistentHashMap.java:152)
	at clojure.lang.RT.get(RT.java:784)
	at cljs.analyzer$gets.invokeStatic(analyzer.cljc:215)
	at cljs.analyzer$gets.invoke(analyzer.cljc:203)
	at cljs.analyzer$resolve_var.invokeStatic(analyzer.cljc:1250)
	at cljs.analyzer$resolve_var.invoke(analyzer.cljc:1181)
	at cljs.analyzer$resolve_var.invokeStatic(analyzer.cljc:1241)
	at cljs.analyzer$resolve_var.invoke(analyzer.cljc:1181)
	at cljs.analyzer$resolve_var.invokeStatic(analyzer.cljc:1187)
	at cljs.analyzer$resolve_var.invoke(analyzer.cljc:1181)
	at cljs.analyzer$resolve_existing_var.invokeStatic(analyzer.cljc:1298)
	at cljs.analyzer$resolve_existing_var.invoke(analyzer.cljc:1293)
	at cljs.analyzer$analyze_symbol.invokeStatic(analyzer.cljc:3788)
	at cljs.analyzer$analyze_symbol.invoke(analyzer.cljc:3752)
	at cljs.analyzer$analyze_form.invokeStatic(analyzer.cljc:4182)
	at cljs.analyzer$analyze_form.invoke(analyzer.cljc:4180)
	at cljs.analyzer$analyze_STAR_.invokeStatic(analyzer.cljc:4236)

bhauman 2020-04-26T16:01:15.077200Z

thats from the process thats still running

dnolen 2020-04-26T16:02:10.077900Z

@bhauman the one thing I changed was how dotted symbols are resolved, so its possible I made a mistake or there's a strange symbol

dnolen 2020-04-26T16:02:21.078400Z

there's was always a bug with dotted symbols

dnolen 2020-04-26T16:02:23.078600Z

foo.bar.baz

bhauman 2020-04-26T16:02:28.079Z

OK dotted symbols

dnolen 2020-04-26T16:02:42.079300Z

what the new logic does now, it checks that foo isn't itself a var

bhauman 2020-04-26T16:02:59.079800Z

goog.debug.Console

dnolen 2020-04-26T16:03:00.079900Z

@bhauman but it shouldn't non-terminate - that's definitely a bug

bhauman 2020-04-26T16:03:58.080600Z

does that incude js/asdf.asdfa.asdf?

dnolen 2020-04-26T16:04:29.081Z

no, js/... is the top branch

dnolen 2020-04-26T16:04:43.081200Z

or rather I don't believe it should

dnolen 2020-04-26T16:05:28.081600Z

though it's a bit strange

dnolen 2020-04-26T16:05:33.082100Z

since the stack should blow

dnolen 2020-04-26T16:05:35.082400Z

this is not a recur

dnolen 2020-04-26T16:05:49.082800Z

not in resolve-var anyway

bhauman 2020-04-26T16:05:52.083Z

hmmm checking if its goog

dnolen 2020-04-26T16:06:35.083400Z

fwiw, we have that in core.cljs so somewhat skeptical

dnolen 2020-04-26T16:06:44.083700Z

goog.math.Integer etc.

bhauman 2020-04-26T16:08:51.084400Z

OK is was (:import [goog])

bhauman 2020-04-26T16:09:03.084800Z

combined with some usage

dnolen 2020-04-26T16:09:04.084900Z

hrm why do you need that?

bhauman 2020-04-26T16:09:11.085100Z

I probably don’t

dnolen 2020-04-26T16:09:26.085500Z

not saying it's not a bug - just (:import [goog]) seems odd

dnolen 2020-04-26T16:09:41.086Z

going to try that here on hello-world

bhauman 2020-04-26T16:09:43.086100Z

I have goog/global.document

dnolen 2020-04-26T16:10:23.086600Z

hrm ok

bhauman 2020-04-26T16:10:23.086700Z

goog/require

bhauman 2020-04-26T16:10:52.087500Z

and goog.global

bhauman 2020-04-26T16:11:11.087900Z

but there is no complaint when I remove it from imports

bhauman 2020-04-26T16:12:08.088400Z

but removing that fixed everything so far

dnolen 2020-04-26T16:14:09.089300Z

hrm

dnolen 2020-04-26T16:14:18.089600Z

(ns hello-world.core
  (:import [goog]))

(println goog/global.document)

dnolen 2020-04-26T16:14:20.089800Z

couldn't repro w/ just this

bhauman 2020-04-26T16:14:56.090700Z

well I could drill further to see which reference caused the ana loop

bhauman 2020-04-26T16:15:07.090900Z

there aren’t to many

dnolen 2020-04-26T16:15:27.091500Z

that would be great - I'm sure there are other projects that might do something like this

bhauman 2020-04-26T16:18:20.092200Z

hmm now could it be that having an import statement like

bhauman 2020-04-26T16:18:23.092500Z

[goog
                      [goog.debug Console]
                      [goog.async Deferred]
                      [goog Promise]
                      [goog.events EventTarget Event]]

bhauman 2020-04-26T16:18:33.092800Z

is causing the problem

dnolen 2020-04-26T16:18:46.093Z

hrm what is that?

bhauman 2020-04-26T16:18:53.093300Z

imports

dnolen 2020-04-26T16:18:54.093400Z

pretty sure that isn't supported

dnolen 2020-04-26T16:19:03.093800Z

:import doesn't let you do that nesting

dnolen 2020-04-26T16:19:11.094100Z

(not in CLJS)

bhauman 2020-04-26T16:19:15.094300Z

its not nesting

bhauman 2020-04-26T16:19:23.094600Z

its just a single ns

bhauman 2020-04-26T16:19:34.095200Z

(:import [goog
                      [goog.debug Console]
                      [goog.async Deferred]
                      [goog Promise]
                      [goog.events EventTarget Event]])

dnolen 2020-04-26T16:20:04.095400Z

(ns hello-world.core
  (:import [goog]))

(println goog/global.document)

dnolen 2020-04-26T16:20:11.095800Z

I did the same thing over here, completes

dnolen 2020-04-26T16:20:16.096Z

and it works even if it's in a preload

dnolen 2020-04-26T16:20:24.096200Z

I'll add [goog Promise]

dnolen 2020-04-26T16:21:04.096400Z

nope

dnolen 2020-04-26T16:21:22.096600Z

oh but maybe

dnolen 2020-04-26T16:21:34.097100Z

goog + goog.debug

dnolen 2020-04-26T16:22:35.097700Z

dang nope

bhauman 2020-04-26T16:22:43.097800Z

I changed it to

(:import [[goog]
                      [goog.debug Console]
                      [goog.async Deferred]
                      [goog Promise]
                      [goog.events EventTarget Event]]

bhauman 2020-04-26T16:22:48.098Z

and its working

dnolen 2020-04-26T16:23:00.098500Z

oh

dnolen 2020-04-26T16:23:09.099Z

sorry I missed that

bhauman 2020-04-26T16:23:20.099200Z

OK I’ll stop thrashing and look more specifically

dnolen 2020-04-26T16:24:58.099500Z

@bhauman I found it

dnolen 2020-04-26T16:25:01.099700Z

don't worry about it

dnolen 2020-04-26T16:25:08.100100Z

hopefully you're unblocked on that problem for now

bhauman 2020-04-26T16:25:12.100300Z

good good

dnolen 2020-04-26T16:27:02.100800Z

https://clojure.atlassian.net/projects/CLJS/issues/CLJS-3239

👍 1
dnolen 2020-04-26T18:05:41.101900Z

@bhauman fixed that one, (:import goog) and (:import [goog]) are now equivalent