<< Back to previous view

[CLJS-1763] Defining a var that clashes with `cljs.core` throws a compiler error instead of warning Created: 24/Aug/16  Updated: 24/Aug/16  Resolved: 24/Aug/16

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

Type: Defect Priority: Major
Reporter: António Nuno Monteiro Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File CLJS-1763.patch    
Patch: Code and Test

 Comments   
Comment by António Nuno Monteiro [ 24/Aug/16 10:43 AM ]

Attached patch with fix and test.

Comment by David Nolen [ 24/Aug/16 11:40 AM ]

fixed https://github.com/clojure/clojurescript/commit/7a06d008fadf56b11dba0f9e2ab97e61059f44fc





[CLJS-1759] Errors writing transit analysis cache if parallel build Created: 19/Aug/16  Updated: 19/Aug/16  Resolved: 19/Aug/16

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

Type: Defect Priority: Major
Reporter: Mike Fikes Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None

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

 Description   
  1. It fails only if parallel builds enabled
  2. When so, it fails, maybe 30 to 50% of the time
  3. If I put a coarse-grained mutex around the write calls, it succeeds
  4. It appears to occur under heave write load 3 concurrent writes

Here is an example of one of the failures:

Exception in thread "main" clojure.lang.ExceptionInfo: failed compiling file:out/cljs/source_map/base64.cljs {:file #object[java.io.File 0x125a8ab6 "out/cljs/source_map/base64.cljs"]}, compiling:(/Users/mfikes/Projects/planck/planck-cljs/script/build.clj:16:1)
        at clojure.lang.Compiler.load(Compiler.java:7391)
        at clojure.lang.Compiler.loadFile(Compiler.java:7317)
        at clojure.main$load_script.invokeStatic(main.clj:275)
        at clojure.main$script_opt.invokeStatic(main.clj:335)
        at clojure.main$script_opt.invoke(main.clj:330)
        at clojure.main$main.invokeStatic(main.clj:421)
        at clojure.main$main.doInvoke(main.clj:384)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.lang.Var.invoke(Var.java:379)
        at clojure.lang.AFn.applyToHelper(AFn.java:154)
        at clojure.lang.Var.applyTo(Var.java:700)
        at clojure.main.main(main.java:37)
Caused by: clojure.lang.ExceptionInfo: failed compiling file:out/cljs/source_map/base64.cljs {:file #object[java.io.File 0x125a8ab6 "out/cljs/source_map/base64.cljs"]}
        at clojure.core$ex_info.invokeStatic(core.clj:4617)
        at clojure.core$ex_info.invoke(core.clj:4617)
        at cljs.compiler$compile_file$fn__3456.invoke(compiler.cljc:1386)
        at cljs.compiler$compile_file.invokeStatic(compiler.cljc:1352)
        at cljs.compiler$compile_file.invoke(compiler.cljc:1332)
        at cljs.closure$compile_file.invokeStatic(closure.clj:474)
        at cljs.closure$compile_file.invoke(closure.clj:465)
        at cljs.closure$eval5203$fn__5204.invoke(closure.clj:541)
        at cljs.closure$eval5139$fn__5140$G__5128__5147.invoke(closure.clj:431)
        at cljs.closure$compile_from_jar.invokeStatic(closure.clj:523)
        at cljs.closure$compile_from_jar.invoke(closure.clj:511)
        at cljs.closure$eval5209$fn__5210.invoke(closure.clj:551)
        at cljs.closure$eval5139$fn__5140$G__5128__5147.invoke(closure.clj:431)
        at cljs.closure$compile_task$fn__5294.invoke(closure.clj:821)
        at cljs.closure$compile_task.invokeStatic(closure.clj:819)
        at cljs.closure$compile_task.invoke(closure.clj:812)
        at cljs.closure$parallel_compile_sources$fn__5300.invoke(closure.clj:848)
        at clojure.lang.AFn.applyToHelper(AFn.java:152)
        at clojure.lang.AFn.applyTo(AFn.java:144)
        at clojure.core$apply.invokeStatic(core.clj:646)
        at clojure.core$with_bindings_STAR_.invokeStatic(core.clj:1881)
        at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1881)
        at clojure.lang.RestFn.invoke(RestFn.java:425)
        at clojure.lang.AFn.applyToHelper(AFn.java:156)
        at clojure.lang.RestFn.applyTo(RestFn.java:132)
        at clojure.core$apply.invokeStatic(core.clj:650)
        at clojure.core$bound_fn_STAR_$fn__4671.doInvoke(core.clj:1911)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.AFn.run(AFn.java:22)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.lang.Exception: Not supported: class java.lang.Integer
        at com.cognitect.transit.impl.WriterFactory$1.write(WriterFactory.java:129)
        at cognitect.transit$write.invokeStatic(transit.clj:149)
        at cognitect.transit$write.invoke(transit.clj:146)
        at cljs.analyzer$write_analysis_cache.invokeStatic(analyzer.cljc:3127)
        at cljs.analyzer$write_analysis_cache.invoke(analyzer.cljc:3114)
        at cljs.compiler$emit_source.invokeStatic(compiler.cljc:1283)
        at cljs.compiler$emit_source.invoke(compiler.cljc:1232)
        at cljs.compiler$compile_file_STAR_$fn__3433.invoke(compiler.cljc:1304)
        at cljs.compiler$with_core_cljs.invokeStatic(compiler.cljc:1154)
        at cljs.compiler$with_core_cljs.invoke(compiler.cljc:1145)
        at cljs.compiler$compile_file_STAR_.invokeStatic(compiler.cljc:1293)
        at cljs.compiler$compile_file_STAR_.invoke(compiler.cljc:1289)
        at cljs.compiler$compile_file$fn__3456.invoke(compiler.cljc:1374)
        ... 29 more


 Comments   
Comment by Mike Fikes [ 19/Aug/16 9:48 AM ]

The attached patch introduces a coarse-grained mutex as indicated in item (3) of the description, providing a work-around for the issue.

Comment by Mike Fikes [ 19/Aug/16 10:43 AM ]

A follow up enhancement ticket that would potentially lead to removing the (presumed) workaround in the patch: CLJS-1761

Comment by David Nolen [ 19/Aug/16 10:44 AM ]

fixed https://github.com/clojure/clojurescript/commit/002708e530b6b3449151d3d077883beeadb92f94





[CLJS-1760] Self-host: test-cljs-1757 failing in test-self-parity Created: 19/Aug/16  Updated: 19/Aug/16  Resolved: 19/Aug/16

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

Type: Defect Priority: Minor
Reporter: Mike Fikes Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: bootstrap, spec

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

 Description   
$ script/test-self-parity
Testing with Node
WARNING: baz is a single segment namespace at line 1
WARNING: Use of undeclared Var cljs.spec$macros/gen at line 77

Testing cljs.core-test

Testing cljs.reader-test

Testing clojure.string-test

Testing clojure.data-test

Testing cljs.letfn-test

Testing cljs.reducers-test

Testing cljs.binding-test

Testing cljs.macro-test

Testing cljs.top-level

Testing cljs.ns-test.foo

Testing foo.ns-shadow-test

Testing cljs.import-test

Testing cljs.spec-test

ERROR in (test-cljs-1757) (TypeError:NaN:NaN)
expected: (s/exercise-fn (quote cljs.spec-test/cljs-1757-x))
  actual: #object[TypeError TypeError: Cannot read property 'call' of undefined]

Testing cljs.clojure-alias-test

Ran 215 tests containing 17428 assertions.
0 failures, 1 errors.


 Comments   
Comment by António Nuno Monteiro [ 19/Aug/16 10:25 AM ]

Attached path with fix.

Comment by Mike Fikes [ 19/Aug/16 10:39 AM ]

LGTM. It is the “correct” fix; I missed when putting together CLJS-1720. All tests pass for me with António's patch.

Comment by David Nolen [ 19/Aug/16 10:42 AM ]

fixed https://github.com/clojure/clojurescript/commit/86a83d720beb44deb5d55d7d9c0bc2d5174816a3





Generated at Fri Aug 26 00:04:35 CDT 2016 using JIRA 4.4#649-r158309.