<< Back to previous view

[CLJS-81] cljsc :externs flag fails when opts map not quoted Created: 23/Sep/11  Updated: 02/Jun/12

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

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


 Description   

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.



 Comments   
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 [...].

http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_04_03.html

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

Generated at Sat Aug 23 13:56:18 CDT 2014 using JIRA 4.4#649-r158309.