[CLJS-2752] load-file fails if no output dir specified Created: 18/May/18  Updated: 18/May/18

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

Type: Defect Priority: Major
Reporter: Mike Fikes Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

{:deps {org.clojure/clojurescript {:mvn/version "1.10.238"}}}



 Description   
foo.cljs
(def x 3)

Working with -d:

$ clj -m cljs.main -re node -d out -r
ClojureScript 1.10.238
cljs.user=> (load-file "foo.cljs")
nil
cljs.user=> x
3

Failing without:

$ clj -m cljs.main -re node -r
ClojureScript 1.10.238
cljs.user=> (load-file "foo.cljs")
java.lang.IllegalArgumentException: /var/folders/gx/nymj3l7x4zq3gxb97v2zwzb40000gn/T/out7651413336278138652227528048732117/cljs/user/fooAD3E4B4.js is not a relative path
	at clojure.java.io$as_relative_path.invokeStatic(io.clj:414)
	at clojure.java.io$file.invokeStatic(io.clj:426)
	at clojure.java.io$file.invoke(io.clj:418)
	at cljs.closure$compile_file.invokeStatic(closure.clj:572)
	at cljs.closure$compile_file.invoke(closure.clj:564)
	at cljs.closure$fn__5124.invokeStatic(closure.clj:653)
	at cljs.closure$fn__5124.invoke(closure.clj:647)
	at cljs.closure$fn__5052$G__5045__5059.invoke(closure.clj:521)
	at cljs.closure$compile.invokeStatic(closure.clj:557)
	at cljs.closure$compile.invoke(closure.clj:554)
	at cljs.repl$load_file$fn__6378.invoke(repl.cljc:586)
	at cljs.repl$load_file.invokeStatic(repl.cljc:585)
	at cljs.repl$load_file.invoke(repl.cljc:577)
	at cljs.repl$fn__6429$self__6431.invoke(repl.cljc:740)
	at clojure.lang.AFn.applyToHelper(AFn.java:165)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.core$apply.invoke(core.clj:652)
	at cljs.repl$wrap_self$g__6408.invoke(repl.cljc:724)
	at cljs.repl$repl_STAR_$read_eval_print__6536.invoke(repl.cljc:955)
	at cljs.repl$repl_STAR_$fn__6542$fn__6551.invoke(repl.cljc:998)
	at cljs.repl$repl_STAR_$fn__6542.invoke(repl.cljc:997)
	at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1285)
	at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1274)
	at cljs.repl$repl_STAR_.invokeStatic(repl.cljc:960)
	at cljs.repl$repl_STAR_.invoke(repl.cljc:839)
	at cljs.cli$repl_opt.invokeStatic(cli.clj:290)
	at cljs.cli$repl_opt.invoke(cli.clj:277)
	at cljs.cli$main.invokeStatic(cli.clj:612)
	at cljs.cli$main.doInvoke(cli.clj:601)
	at clojure.lang.RestFn.applyTo(RestFn.java:139)
	at clojure.core$apply.invokeStatic(core.clj:659)
	at clojure.core$apply.invoke(core.clj:652)
	at cljs.main$_main.invokeStatic(main.clj:61)
	at cljs.main$_main.doInvoke(main.clj:52)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.main$main_opt.invokeStatic(main.clj:317)
	at clojure.main$main_opt.invoke(main.clj:313)
	at clojure.main$main.invokeStatic(main.clj:424)
	at clojure.main$main.doInvoke(main.clj:387)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.main.main(main.java:37)

Generated at Wed Apr 24 01:13:29 CDT 2019 using JIRA 4.4#649-r158309.