ClojureScript

Extra out directory in path with load-file

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.10.238
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    {:deps {org.clojure/clojurescript {:mvn/version "1.10.238"}}}
  • Patch:
    Code

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

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

Otherwise things appear to work.

Activity

Hide
Herald Reierskog added a comment -

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.

Show
Herald Reierskog added a comment - 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.
Hide
Mike Fikes added a comment -

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.

Show
Mike Fikes added a comment - 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.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: