Uploaded image for project: 'ClojureScript'
  1. CLJS-2199

String requires broken after recompile

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Completed
    • Affects versions: 1.9.854
    • Fix versions: 1.9.854
    • 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.

        Attachments

          Activity

            People

            • Assignee:
              dnolen David Nolen
              Reporter:
              deraen Juho Teperi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: