ClojureScript

Pattern used in path-seq is not portable

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Any environment that uses '\' as its default path separator.
  • Patch:
    Code

Description

The pattern used in cljs/compiler.clj to generate a path sequence is not portable.
Every execution of cljsc throws a Pattern error in some environments.

Activity

Hide
Brenton Ashworth added a comment -

Here is the related conversation on the mailing list.

http://groups.google.com/group/clojure/browse_thread/thread/90e6c22b8224ded6

Show
Brenton Ashworth added a comment - Here is the related conversation on the mailing list. http://groups.google.com/group/clojure/browse_thread/thread/90e6c22b8224ded6
Hide
Paul Michael Bauer added a comment -

Re-uploading patch (portable-path-regex-propertly-annotated.diff).
Previous patch did not have the proper name and email address associated with the CA.

Show
Paul Michael Bauer added a comment - Re-uploading patch (portable-path-regex-propertly-annotated.diff). Previous patch did not have the proper name and email address associated with the CA.
Hide
Marko Kocić added a comment -

The attached patch solves only a part of the issue. After applying the patch I was still not able to compile twitterbuzz. Here's the exception I got:

c:\development\cvstree\clojurescript\samples\twitterbuzz>..\..\bin\cljsc src > twitterbuzz.js
Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: The file C:\development\cvstree\clojurescript\src\cljs\cljs%5ccore.cljs does not exist.
at clojure.lang.Util.runtimeException(Util.java:153)
at clojure.lang.Compiler.eval(Compiler.java:6417)
at clojure.lang.Compiler.load(Compiler.java:6843)
at clojure.lang.Compiler.loadFile(Compiler.java:6804)
at clojure.main$load_script.invoke(main.clj:282)
at clojure.main$script_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:426)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:405)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:518)
at clojure.main.main(main.java:37)
Caused by: java.io.FileNotFoundException: The file C:\development\cvstree\clojurescript\src\cljs\cljs%5ccore.cljs does not exist.
at cljs.compiler$compile_file.invoke(compiler.clj:1135)
at cljs.closure$compile_file.invoke(closure.clj:224)
at cljs.closure$eval1132$fn__1133.invoke(closure.clj:266)
at cljs.closure$eval1068$fn_1069$G1059_1076.invoke(closure.clj:187)
at cljs.closure$eval1119$fn__1120.invoke(closure.clj:280)
at cljs.closure$eval1068$fn_1069$G1059_1076.invoke(closure.clj:187)
at cljs.closure$eval1127$fn__1128.invoke(closure.clj:271)
at cljs.closure$eval1068$fn_1069$G1059_1076.invoke(closure.clj:187)
at cljs.closure$get_compiled_cljs.invoke(closure.clj:421)
at cljs.closure$cljs_dependencies.invoke(closure.clj:451)
at cljs.closure$add_dependencies.doInvoke(closure.clj:473)
at clojure.lang.RestFn.applyTo(RestFn.java:139)
at clojure.core$apply.invoke(core.clj:602)
at cljs.closure$build.invoke(closure.clj:712)
at user$eval1266.invoke(cljsc.clj:21)
at clojure.lang.Compiler.eval(Compiler.java:6406)
... 10 more

Show
Marko Kocić added a comment - The attached patch solves only a part of the issue. After applying the patch I was still not able to compile twitterbuzz. Here's the exception I got: c:\development\cvstree\clojurescript\samples\twitterbuzz>..\..\bin\cljsc src > twitterbuzz.js Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: The file C:\development\cvstree\clojurescript\src\cljs\cljs%5ccore.cljs does not exist. at clojure.lang.Util.runtimeException(Util.java:153) at clojure.lang.Compiler.eval(Compiler.java:6417) at clojure.lang.Compiler.load(Compiler.java:6843) at clojure.lang.Compiler.loadFile(Compiler.java:6804) at clojure.main$load_script.invoke(main.clj:282) at clojure.main$script_opt.invoke(main.clj:342) at clojure.main$main.doInvoke(main.clj:426) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:405) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:518) at clojure.main.main(main.java:37) Caused by: java.io.FileNotFoundException: The file C:\development\cvstree\clojurescript\src\cljs\cljs%5ccore.cljs does not exist. at cljs.compiler$compile_file.invoke(compiler.clj:1135) at cljs.closure$compile_file.invoke(closure.clj:224) at cljs.closure$eval1132$fn__1133.invoke(closure.clj:266) at cljs.closure$eval1068$fn_1069$G1059_1076.invoke(closure.clj:187) at cljs.closure$eval1119$fn__1120.invoke(closure.clj:280) at cljs.closure$eval1068$fn_1069$G1059_1076.invoke(closure.clj:187) at cljs.closure$eval1127$fn__1128.invoke(closure.clj:271) at cljs.closure$eval1068$fn_1069$G1059_1076.invoke(closure.clj:187) at cljs.closure$get_compiled_cljs.invoke(closure.clj:421) at cljs.closure$cljs_dependencies.invoke(closure.clj:451) at cljs.closure$add_dependencies.doInvoke(closure.clj:473) at clojure.lang.RestFn.applyTo(RestFn.java:139) at clojure.core$apply.invoke(core.clj:602) at cljs.closure$build.invoke(closure.clj:712) at user$eval1266.invoke(cljsc.clj:21) at clojure.lang.Compiler.eval(Compiler.java:6406) ... 10 more
Hide
Brenton Ashworth added a comment -

Marko,

I did some work on Windows issues yesterday and found and fixed this problem as well as a few others. I will apply this patch and my fixes today.

Show
Brenton Ashworth added a comment - Marko, I did some work on Windows issues yesterday and found and fixed this problem as well as a few others. I will apply this patch and my fixes today.
Hide
Brenton Ashworth added a comment -

The following two commits fix this problem as well as all other problems that I found while trying the compile the sample apps on Windows within the Cygwin environment.

https://github.com/clojure/clojurescript/commit/add1dfcdbb68c2d98ff62f999c094f536c842f78
https://github.com/clojure/clojurescript/commit/d38729e66631bd649dc7c87f70e9b501d58da266

Show
Brenton Ashworth added a comment - The following two commits fix this problem as well as all other problems that I found while trying the compile the sample apps on Windows within the Cygwin environment. https://github.com/clojure/clojurescript/commit/add1dfcdbb68c2d98ff62f999c094f536c842f78 https://github.com/clojure/clojurescript/commit/d38729e66631bd649dc7c87f70e9b501d58da266
Hide
Marko Kocić added a comment -

I can confirm that compile now works correctly on windows.
I tested it in plain windows (no cygwin) using my patch for adding cmdline scripts which is attached to #CLJS-24

Show
Marko Kocić added a comment - I can confirm that compile now works correctly on windows. I tested it in plain windows (no cygwin) using my patch for adding cmdline scripts which is attached to #CLJS-24

People

Vote (1)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: