bhauman / lein-figwheel

Figwheel builds your ClojureScript code and hot loads it into the browser as you are coding!
Eclipse Public License 1.0
2.88k stars 208 forks source link

Reload ordering with Nodejs + CLJS >= 1.9.473 #525

Closed pkpkpk closed 7 years ago

pkpkpk commented 7 years ago

The new CLJS node changes remove user namespaces from js/goog.dependencies_.requires . This means that figwheel.client.file-reloading/get-all-dependents will return reload files in the wrong ordering, because they have been ignored by the topo-sort.

Simplest case, 2 files:

(ns ^:figwheel-always app.core
  (:require [app.child]))

(println "core loaded")
(ns app.child)

(println "child loaded")

If you save app.child, as of CLJS 1.9.473 the child core will reload first, then child

bhauman commented 7 years ago

Thanks for the report :)

wildermuthn commented 7 years ago

It looks to me like the only file reloaded is the file you change — none of its dependent namespaces reload either. Basically broken. Would love to help however I can.

bhauman commented 7 years ago

Just want to provide an update here:

The issue has been found and reported: https://dev.clojure.org/jira/browse/CLJS-2151

And a fix should be in place soon.