<< Back to previous view

[CLJS-1897] Too many externs generated Created: 23/Jan/17  Updated: 23/Jan/17  Resolved: 23/Jan/17

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

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


 Description   

If a user supplies an extern file and then writes code which uses something not defined in the extern we will generated duplicated information in the inferred extern. For example we will generate:

var Foo;
Foo.Bar = {};
Foo.Bar.prototype.baz;

But Foo and Foo.Bar are already present in the existing extern.



 Comments   
Comment by David Nolen [ 23/Jan/17 3:59 PM ]

fixed https://github.com/clojure/clojurescript/commit/960bb9b778190aa7359acb2f74cc61d452cef2ae





[CLJS-1895] Externs inference needs to support user supplied externs Created: 21/Jan/17  Updated: 21/Jan/17  Resolved: 21/Jan/17

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

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


 Comments   
Comment by David Nolen [ 21/Jan/17 4:37 PM ]

fixed https://github.com/clojure/clojurescript/commit/342923bd4428ec8cce3f487eaf37a8ee27bab14f





[CLJS-1873] Self-host: Unit tests fail owing to test.check dep Created: 16/Dec/16  Updated: 21/Jan/17  Resolved: 21/Jan/17

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

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

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

 Description   

Currently the self-host unit tests fail to run with:

$ script/test-self-parity
Testing with Node
WARNING: baz is a single segment namespace at line 1 src/test/cljs/baz.cljs
#error {:message "No such namespace: cljs.test.check, could not locate cljs/test/check.cljs, cljs/test/check.cljc, or Closure namespace \"cljs.test.check\"", :data {:tag :cljs/analysis-error}}

Reason:

With https://github.com/clojure/clojurescript/commit/d1b8b31f7247688098d9e61bb33302a6edc57c2c
the cljs.spec-test namespace was revised to require the cljs.spec.test namespace, which, in turn requires the clojure.test.check namespace. (The auto-aliasing to cljs.test.check is tried an this fails, and this is the diagnostic you ultimately see.)

The port of test.check to self-hosted ClojureScript (TCHECK-105) hasn't yet been released, and, so far, the self-host tests have been avoiding the need for test.check.



 Comments   
Comment by Mike Fikes [ 16/Dec/16 7:07 PM ]

Attached patch fixes the self-test unit tests by moving the test.check-dependent portion into a test namespace for cljs.spec.test (namely cljs.spec.test-test) which is skipped in self-host tests. (When TCHECK-105 is released we can re-visit and revise the self-host test runner to load the needed source from the test check JAR that is placed in lib by script/bootstrap.

Comment by David Nolen [ 21/Jan/17 6:57 AM ]

fixed https://github.com/clojure/clojurescript/commit/1f9fad5ee4450e579f1659f62dcdbcafc20298f4





[CLJS-1874] Self-host: :fn-var true for macros Created: 16/Dec/16  Updated: 21/Jan/17  Resolved: 21/Jan/17

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

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

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

 Description   

In self-host ClojureScript, :fn-var is unconditionally set to true for macros.

One issue this creates is for cljs.test/function?, here

https://github.com/clojure/clojurescript/blob/d1b8b31f7247688098d9e61bb33302a6edc57c2c/src/main/cljs/cljs/test.cljc#L23

in that it causes macros in is expressions, like (is (or true)) to be mis-handled
as if they were functions.

Here is a minimal repro illustrating :fn-var being set:

$ java -jar cljs.jar -m cljs.repl.node
ClojureScript Node.js REPL server listening on 52055
To quit, type: :cljs/quit
cljs.user=> (require 'cljs.js)
true
cljs.user=> (let [st (cljs.js/empty-state)]
  (cljs.js/eval-str st
    "(ns cljs.user (:require-macros foo.core))"
    nil
    {:eval    cljs.js/js-eval
     :load    (fn [_ cb]
                (cb {:lang   :clj
                     :source "(ns foo.core) (defmacro add [a b] `(+ ~a ~b))"}))
     :context :expr}
    (fn [_]
      (-> @st
        (get-in [:cljs.analyzer/namespaces 'foo.core$macros :defs 'add])
        (select-keys [:macro :fn-var])))))
{:macro true, :fn-var true}
cljs.user=>

Note in the repro above both :macro and :fn-var are set to true.



 Comments   
Comment by David Nolen [ 21/Jan/17 6:55 AM ]

fixed https://github.com/clojure/clojurescript/commit/51ca92b7260bfa22f309766e6ae914d044e5cc5e





[CLJS-1877] :foreign-libs entries should be allowed to specify directories along with individual files Created: 21/Dec/16  Updated: 20/Jan/17  Resolved: 20/Jan/17

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

Type: Enhancement Priority: Major
Reporter: David Nolen Assignee: David Nolen
Resolution: Completed Votes: 1
Labels: None


 Comments   
Comment by David Nolen [ 20/Jan/17 3:33 PM ]

Work in progress here https://github.com/clojure/clojurescript/tree/cljs-1877

Comment by David Nolen [ 20/Jan/17 5:12 PM ]

One issue right now is that we blindly copy :libs files already in :output-dir (like Closure processed files) back into :output-dir via write-cljs.closure/javascript.

Comment by David Nolen [ 20/Jan/17 5:56 PM ]

basic work in place https://github.com/clojure/clojurescript/commit/30acd88d02857dc903b4da7c028c522d21b37b25. Likely needs further refinement but that can be handled with smaller tickets.





[CLJS-1890] s/form for s/nilable in cljs.spec does not match clojure.spec Created: 17/Jan/17  Updated: 20/Jan/17  Resolved: 20/Jan/17

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

Type: Defect Priority: Major
Reporter: Miikka Koskinen Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None
Environment:

Clojure 1.9-alpha14



 Description   
Clojure
user=> (s/form (s/nilable int?))
(clojure.spec/nilable clojure.core/int?)
ClojureScript
cljs.user=> (s/form (s/nilable int?))
(cljs.spec/and (cljs.spec/or :cljs.spec/nil cljs.core/nil? :cljs.spec/pred cljs.core/int?) (cljs.spec/conformer cljs.core/second))

What I expected from ClojureScript was (cljs.spec/nilable cljs.core/int?).



 Comments   
Comment by David Nolen [ 20/Jan/17 3:31 PM ]

fixed https://github.com/clojure/clojurescript/commit/2ef5b0d0b0f95f779cc99334300f5fe39144fd23





[CLJS-1811] Can't compose cljs.spec.test.instrument (or cljs.spec.test.check) with cljs.spec.test.enumerate-namespace Created: 05/Oct/16  Updated: 20/Jan/17  Resolved: 20/Jan/17

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

Type: Defect Priority: Major
Reporter: JR Heard Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None
Environment:

Clojurescript 1.9.229



 Description   

When I call

(stest/instrument
  (stest/enumerate-namespace 'my.ns))

I get a stack trace that includes a message like `Caused by: java.lang.RuntimeException: No such namespace: stest`.

The same thing happens when I call

(stest/check
  (stest/enumerate-namespace 'my.ns))


 Comments   
Comment by JR Heard [ 05/Oct/16 5:29 PM ]

(I'm still a newbie here, please let me know if there's any more information I can provide!)

Comment by David Nolen [ 16/Dec/16 2:36 PM ]

Thanks for the report will take a look at this.

Comment by David Nolen [ 30/Dec/16 2:23 PM ]

After some consideration I now think that the Clojure enumerate-namespace helper isn't a good fit and will be unnecessarily challenging to implement in the same way. syntax-quote does not try to qualify symbols with periods in them, perhaps we should just rely on this behavior.

Comment by David Nolen [ 20/Jan/17 3:13 PM ]

fixed https://github.com/clojure/clojurescript/commit/ec220f51efb8a456479c4d0b5c27e611d3abb551





[CLJS-1894] Unnecessary analysis of core.cljs on first compile Created: 20/Jan/17  Updated: 20/Jan/17  Resolved: 20/Jan/17

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

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


 Description   

The first compile does not use the cached analysis provided in the ClojureScript JAR.



 Comments   
Comment by David Nolen [ 20/Jan/17 2:35 PM ]

fixed https://github.com/clojure/clojurescript/commit/a3f552cb032d7de0a564d6d5667258b8004500a9





[CLJS-1893] Unnecessary analysis of core.cljs Created: 20/Jan/17  Updated: 20/Jan/17  Resolved: 20/Jan/17

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

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


 Comments   
Comment by David Nolen [ 20/Jan/17 2:22 PM ]

fixed https://github.com/clojure/clojurescript/commit/462e2295d6e6c1a01b279c8aa091f832c9d09824





[CLJS-1892] Dependencies in JARs are analyzed everytime even if an analysis cache file exists Created: 20/Jan/17  Updated: 20/Jan/17  Resolved: 20/Jan/17

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

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


 Comments   
Comment by David Nolen [ 20/Jan/17 12:39 PM ]

This appears to be a regression introduced by the fixes to Transit analysis cache support.

Comment by David Nolen [ 20/Jan/17 1:05 PM ]

Upon further investigation it may be that this never worked correctly when following dependencies of an ns form.

Comment by David Nolen [ 20/Jan/17 1:16 PM ]

fixed https://github.com/clojure/clojurescript/commit/ba0983bc1e7ffb45907cc3762fef11a3c3e0ee03





Generated at Mon Jan 23 23:11:31 CST 2017 using JIRA 4.4#649-r158309.