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

cljs.main: Browser REPL port not conveyed if --compile

    Details

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

      Description

      This works:

      $ clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.439"}}}' -m cljs.main -p 8090 -d out -r
      ClojureScript 1.10.439
      cljs.user=> clojure.browser.repl/PORT
      8090
      

      but adding -c fails:

      src/foo/core.cljs
      (ns foo.core)
      
      $ clj -Srepro -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.439"}}}' -m cljs.main -p 8090 -d out -c foo.core -r
      

      with the REPL blocking and the browser log indicating:

      [Error] Failed to load resource: Could not connect to the server. (repl, line 0)
      http://localhost:9000/repl?xpc=%7B%22cn%22%3A%22v9YNhZWQN3%22%2C%22tp%22%3Anull%2C%22osh%22%3Anull%2C%22ppu%22%3A%22http%3A%2F%2Flocalhost%3A8090%2Frobots.txt%22%2C%22lpu%22%3A%22http%3A%2F%2Flocalhost%3A9000%2Frobots.txt%22%7D
      

      out/main.js has

      var CLOSURE_UNCOMPILED_DEFINES = {};
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: