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

cljs.main: Browser REPL failure processing require of cljs.js in --init file

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: None
    • Labels:
      None
    • Environment:

      {:deps {org.clojure/clojurescript
      {:git/url "https://github.com/clojure/clojurescript"
      :sha "a095d308484fa2ccea11b6d7256fb310d5d57c33"}}}

      Description

      There is a failure to process (require 'cljs.js) when in an --init file for the browser REPL. I haven't found any other namespace that this fails with (for example, clojure.set doesn't exhibit this).

      Repro:

      foo.cljs
      (require 'cljs.js)
      
      (prn cljs.js/empty-state)
      
      $ clj -Srepro -m cljs.main -re browser -i foo.cljs -r
      TypeError: undefined is not an object (evaluating 'cljs.js.empty_state')
      cljs.user=>
      

      It works fine with Node:

      $ clj -Srepro -m cljs.main -re node -i foo.cljs -r
      #object[cljs$js$empty_state]
      cljs.user=>
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mfikes Mike Fikes
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: