<< Back to previous view

[CLJS-2753] Extra out directory in path with load-file Created: 18/May/18  Updated: 15/Oct/18

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

Type: Defect Priority: Minor
Reporter: Mike Fikes Assignee: David Nolen
Resolution: Unresolved Votes: 0
Labels: None

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

Attachments: Text File CLJS-2753.patch    
Patch: Code

(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")
cljs.user=> x

You will end up with out/out/cljs/user/fooAD3E4B4.js

Otherwise things appear to work.

Comment by Herald Reierskog [ 15/Oct/18 1:38 PM ]

cljs.closure/compile-file adds :output-dir from opts to file, causing it to appear double. Passing (dissoc opts :output-dir) as third argument to cljs.closure/src-file->target-file (as is done in cljs.repl.rhino,nashorn,node,graaljs) avoids adding the first instance of output-dir to fix this bug, and fixes CLJS-2917 as well.

Comment by Mike Fikes [ 15/Oct/18 5:14 PM ]

CLJS-2753.patch LGTM and passes in CI and Canary.

I confirmed correct behavior for the ticket as written and for CLJS-2917 and I also did some light testing with other scenarios.

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