<< Back to previous view

[CLJS-3004] cljs.main: Browser REPL port not conveyed if --compile Created: 04/Dec/18  Updated: 04/Dec/18

Status: Open
Project: ClojureScript
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Mike Fikes Assignee: Unassigned
Resolution: Unresolved Votes: 0
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 = {};

Generated at Thu Apr 18 15:50:24 CDT 2019 using JIRA 4.4#649-r158309.