ClojureScript

String requires broken after recompile

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Completed
  • Affects Version/s: 1.9.854
  • Fix Version/s: 1.9.854
  • Component/s: None
  • Approval:
    Vetted

Description

String requires uses js-module-exists? to check if module needs to loaded: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/analyzer.cljc#L722

It checks the compiler state for :js-module-index.

The first time e.g. react-dom/server is not found.

If using the same compiler state for recompile, the second time the module is already present in compiler-state.

This means that the module is not indexed into foreign-libs: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/closure.clj#L2043

Result is that cljs_deps.js won't have the line for react-dom/sever or No such namespace exception about react-dom$server.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: