<< Back to previous view

[CLJS-81] cljsc :externs flag fails when opts map not quoted Created: 23/Sep/11  Updated: 10/Nov/15  Resolved: 10/Nov/15

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

Type: Defect Priority: Minor
Reporter: Fogus Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None


For example, in the samples/hello-js directory, running the following works fine:

    cljsc src '{:optimizations :advanced :output-to "hello-extern.js" :externs ["externs.js"]}'

However, the following fails:

    cljsc src {:optimizations :advanced :externs ["./externs.js"]} > hello-extern.js

With the error message "Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :as-file of protocol: #'clojure.java.io/Coercions found for class: clojure.lang.Symbol".

Fully qualifying the path to externs.js seems to work, BUT it actually fails by placing an exception message into the hello-externs.js file.

Comment by Brian Taylor [ 02/Jun/12 4:48 PM ]

I think your shell (bash?) may be treating the [...] portion of that expression as a character class and substituting matches from the file system. I'm not aware of any method for avoiding this other than changing shells to one that won't try to expand the [...].


Perhaps we should change the documentation examples so that they always quote the opts map. Maybe that would help avoid confusion.

Comment by David Nolen [ 10/Nov/15 10:15 AM ]

No more dev on cljsc script

Generated at Sun Jan 21 12:46:32 CST 2018 using JIRA 4.4#649-r158309.