<< Back to previous view

[CLJS-2784] Namespace never provided error Created: 16/Jun/18  Updated: 17/Jun/18  Resolved: 17/Jun/18

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

Type: Defect Priority: Major
Reporter: Gal Dolber Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: regression
Environment:

{:deps {org.clojure/clojurescript {:git/url "https://github.com/clojure/clojurescript"
:sha "ec1e416bccf7ad2d63d8e97a156dec989fa1a9d7"}
com.cognitect/transit-cljs {:mvn/version "0.8.256"}}}



 Description   
src/foo/core.cljs
(ns foo.core
 (:require cognitect.transit))
$ clj -m cljs.main -O advanced -c foo.core
Jun 17, 2018 9:09:56 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/mfikes/Desktop/cljs-2784/out/cognitect/transit.js:5: ERROR - required "com$.cognitect.transit" namespace never provided
goog.require('com$.cognitect.transit');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 17, 2018 9:09:56 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/mfikes/Desktop/cljs-2784/out/cognitect/transit.js:6: ERROR - required "com$.cognitect.transit.types" namespace never provided
goog.require('com$.cognitect.transit.types');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 17, 2018 9:09:56 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/mfikes/Desktop/cljs-2784/out/cognitect/transit.js:7: ERROR - required "com$.cognitect.transit.eq" namespace never provided
goog.require('com$.cognitect.transit.eq');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

Reverting this commit seems to fix the issue:
https://github.com/clojure/clojurescript/commit/ec1e416bccf7ad2d63d8e97a156dec989fa1a9d7

The root cause is that, even though the intent is to munge com to com$ universally (including munging the goog.provide statements emitted for ClojureScript namespaces that start with com), it doesn't munge non-compiled goog.provide statements that are explicitly authored by hand: https://github.com/cognitect/transit-js/blob/b3cf3d60da339b73d269f14713cced33332d43a7/src/com/cognitect/transit.js#L17



 Comments   
Comment by David Nolen [ 17/Jun/18 9:03 AM ]

Hrm yeah, I'm OK on giving up on Rhino for this particular issue for now. We should reopen and lower the priority on CLJS-2770.

Comment by David Nolen [ 17/Jun/18 9:06 AM ]

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





[CLJS-2783] with-out-str conflicts with :infer-externs Created: 16/Jun/18  Updated: 16/Jun/18  Resolved: 16/Jun/18

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

Type: Defect Priority: Minor
Reporter: Gal Dolber Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: infer-externs
Environment:

macOS


Patch: Code
Approval: Accepted

 Description   
(println (with-out-str (println "bug")))

Produces the following warning by producing a wrong inferred-externs.js:

WARNING: target/node/dev/inferred_externs.js:3: WARNING - name goog is not defined in the externs.
goog.string;
^^^^

Jun 16, 2018 2:55:45 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: target/node/dev/inferred_externs.js:4: WARNING - name goog is not defined in the externs.
goog.string.StringBuffer;
^^^^

Jun 16, 2018 2:55:45 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: target/node/dev/inferred_externs.js:5: WARNING - name goog is not defined in the externs.
goog.string.StringBuffer.prototype.append;
^^^^

The problem seems to go away when removing the "js/" below on "js/goog.string.StringBuffer.":

(core/defmacro with-out-str
  "Evaluates exprs in a context in which *print-fn* is bound to .append
  on a fresh StringBuffer.  Returns the string created by any nested
  printing calls."
  [& body]
  `(let [sb# (js/goog.string.StringBuffer.)]
     (binding [cljs.core/*print-newline* true
               cljs.core/*print-fn* (fn [x#] (.append sb# x#))]
       ~@body)
     (cljs.core/str sb#)))


 Comments   
Comment by David Nolen [ 16/Jun/18 9:06 PM ]

fixed https://github.com/clojure/clojurescript/commit/6048bc95001e1d5f1c996c5cda187cdfc0193bc8





[CLJS-2782] lein test fails if directory has hyphens Created: 16/Jun/18  Updated: 16/Jun/18

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

Type: Defect Priority: Major
Reporter: Mike Fikes Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Master as of https://github.com/clojure/clojurescript/commit/7528dc79fea372fafa365ee80e4568a3af5f1526



 Description   

Create a directory with hyphens in its name, and then clone clojurescript into it and run lein test.

lein test :only cljs.module-processing-tests/commonjs-module-processing-preprocess-symbol

FAIL in (commonjs-module-processing-preprocess-symbol) (module_processing_tests.clj:191)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$mfikes$Desktop$dir_with_hypens$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$mfikes$Desktop$dir_with_hypens$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$mfikes$Desktop$dir-with-hypens$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$mfikes$Desktop$dir-with-hypens$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/es6-module-processing

FAIL in (es6-module-processing) (module_processing_tests.clj:97)
Processed modules are added to :js-module-index
expected: (= {"es6-hello" {:name (absolute-module-path "src/test/cljs/es6_hello.js"), :module-type :es6}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"es6-hello" {:name "module$Users$mfikes$Desktop$dir_with_hypens$clojurescript$src$test$cljs$es6-hello", :module-type :es6}} {"es6-hello" {:name "module$Users$mfikes$Desktop$dir-with-hypens$clojurescript$src$test$cljs$es6-hello", :module-type :es6}}))

lein test :only cljs.module-processing-tests/test-cljs-1822

FAIL in (test-cljs-1822) (module_processing_tests.clj:162)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/react-min.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle-min.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$mfikes$Desktop$dir_with_hypens$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$mfikes$Desktop$dir_with_hypens$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}} {"React" {:name "module$Users$mfikes$Desktop$dir-with-hypens$clojurescript$src$test$cljs$react-min", :module-type :commonjs}, "Circle" {:name "module$Users$mfikes$Desktop$dir-with-hypens$clojurescript$src$test$cljs$Circle-min", :module-type :commonjs}}))

lein test :only cljs.module-processing-tests/commonjs-module-processing

FAIL in (commonjs-module-processing) (module_processing_tests.clj:71)
Processed modules are added to :js-module-index
expected: (= {"React" {:name (absolute-module-path "src/test/cljs/reactJS.js"), :module-type :commonjs}, "Circle" {:name (absolute-module-path "src/test/cljs/Circle.js"), :module-type :commonjs}} (:js-module-index (clojure.core/deref cenv)))
  actual: (not (= {"React" {:name "module$Users$mfikes$Desktop$dir_with_hypens$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$mfikes$Desktop$dir_with_hypens$clojurescript$src$test$cljs$Circle", :module-type :commonjs}} {"React" {:name "module$Users$mfikes$Desktop$dir-with-hypens$clojurescript$src$test$cljs$reactJS", :module-type :commonjs}, "Circle" {:name "module$Users$mfikes$Desktop$dir-with-hypens$clojurescript$src$test$cljs$Circle", :module-type :commonjs}}))

Perhaps related to CLJS-2703.






[CLJS-2781] Validate `:global-exports` Created: 16/Jun/18  Updated: 16/Jun/18

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

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


 Description   

Currently we don't validate `:global-exports`. It must map known provides to some symbol that represents a JavaScript global var.






[CLJS-2780] Async tests prematurely terminate in Node Created: 15/Jun/18  Updated: 16/Jun/18  Resolved: 16/Jun/18

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

Type: Defect Priority: Major
Reporter: Mike Fikes Assignee: Mike Fikes
Resolution: Completed Votes: 0
Labels: regression
Environment:

{:deps {org.clojure/clojurescript {:mvn/version "1.10.238"}}}


Attachments: Text File CLJS-2780.patch    
Patch: Code and Test
Approval: Accepted

 Description   

If you run cljs.test tests in Node where any are async, things may not terminate properly.

In this example, the js/setTimeout keeps Node alive, but something may happen near the very end of execution that causes failure.

src/foo/runner.cljs
(ns foo.runner
  (:require
   [clojure.test :refer [run-tests]]
   [foo.core-test]))

(defn -main [& args]
  (run-tests 'foo.core-test))
src/foo/core_test.cljs
(ns foo.core-test
  (:require
   [clojure.test :refer [deftest async is]]))

(deftest bar
  (async done
    (js/setTimeout
      #(do
         (is (= 1 1))
         (done))
      1000)))

Here is what execution with Node looks like:

$ clj -m cljs.main -re node -m foo.runner

Testing foo.core-test

Compare this with Nashorn:

$ clj -m cljs.main -re nashorn -m foo.runner

Testing foo.core-test

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

Likewise, this works properly with Planck:

$ plk -m foo.runner

Testing foo.core-test

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

and Lumo:

$ lumo -c src -m foo.runner

Testing foo.core-test

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

The only reason for illustrating Planck and Lumo (which is based on Node) is to suggest that some reasonable small tweak that would make this work in Node is within reach.



 Comments   
Comment by Mike Fikes [ 16/Jun/18 2:33 PM ]

This is a regression that occurred during the betas leading up to the 1.10.238 release.

This worked properly with the 1.10.191 beta release

{:deps {org.clojure/clojurescript {:mvn/version "1.10.191"}}}

and so did this use case from CLJS-2574:

clj -m cljs.main -re node -e '(js/setTimeout #(prn :hi) 1000)' -e ':goodbye'

Git bisect result:

84004ff7d90d48a730b2e1e8ebc2c421830462f7 is the first bad commit
commit 84004ff7d90d48a730b2e1e8ebc2c421830462f7
Author: David Nolen <david.nolen@gmail.com>
Date:   Mon Mar 19 12:21:33 2018 +0100

    refactor so that printing and evaluation result has a deterministic
    order at the REPL.

:040000 040000 442862c8f0e21e316b21567e697f7bca26e8b19d 64813d98c34da80a5e527745ed259b169594b729 M	src
Comment by Mike Fikes [ 16/Jun/18 4:33 PM ]

See commit comment for explanation of patch.

Comment by Mike Fikes [ 16/Jun/18 10:01 PM ]

Fixed https://github.com/clojure/clojurescript/commit/5dc641ed1bf5ea642a9cb00f0fc770eb479c23bb





[CLJS-2779] self-host: test-global-exports-cljs-2243 and test-cljs-2287 failing Created: 15/Jun/18  Updated: 15/Jun/18  Resolved: 15/Jun/18

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

Approval: Accepted

 Description   

On master, script/test-self-host:

FAIL in (test-global-exports-cljs-2243) (core-self-test.js:14153:113)
expected: (some? (re-find #"foo\.core\.global\$module\$calculator = goog.global.Calculator;" value))
  actual: (not (some? nil))

FAIL in (test-cljs-2287) (core-self-test.js:14203:377)
expected: (some? (re-find #"foo\.core\.global\$module\$calculator = goog.global.Calculator;\snull;" source))
  actual: (not (some? nil))


 Comments   
Comment by David Nolen [ 15/Jun/18 7:15 AM ]

fixed https://github.com/clojure/clojurescript/commit/18b97ab86484c4f52bcb462fe585b011e6cf37f2





[CLJS-2778] Unit test failure cljs.build-api-tests/test-emit-global-requires-cljs-2214 Created: 14/Jun/18  Updated: 15/Jun/18  Resolved: 15/Jun/18

Status: Resolved
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
Environment:

Windows AppVeyor CI https://ci.appveyor.com/project/mfikes/clojurescript/build/1.0.148#L99
Travis CI https://travis-ci.org/mfikes/clojurescript/builds/392484188#L2265


Approval: Accepted

 Description   
lein test :only cljs.build-api-tests/test-emit-global-requires-cljs-2214

FAIL in (test-emit-global-requires-cljs-2214) (build_api_tests.clj:399)
simplest case, require
expected: (true? (boolean (re-find #"emit_global_requires_test\.core\.global\$module\$react_dom\$server = goog\.global\.ReactDOMServer;" (slurp (io/file out "emit_global_requires_test/core.js")))))
  actual: (not (true? false))
events.js:160
      throw er; // Unhandled 'error' event


 Comments   
Comment by David Nolen [ 15/Jun/18 7:14 AM ]

fixed https://github.com/clojure/clojurescript/commit/18b97ab86484c4f52bcb462fe585b011e6cf37f2





[CLJS-2777] Bump Closure-compiler Created: 14/Jun/18  Updated: 14/Jun/18  Resolved: 14/Jun/18

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

Type: Enhancement Priority: Major
Reporter: Juho Teperi Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File CLJS-2777.patch    
Approval: Accepted

 Description   

One important fix in the latest Closure-compiler is fix for UMD wrapper detection which incorrectly handled React CJS bundles.

https://github.com/google/closure-compiler/issues/2841
https://github.com/google/closure-compiler/pull/2963



 Comments   
Comment by David Nolen [ 14/Jun/18 12:53 PM ]

fixed https://github.com/clojure/clojurescript/commit/23d97da89232da99a5d42cf6637b70319a01949d





[CLJS-2776] :main validation checks causing unit test failures Created: 13/Jun/18  Updated: 13/Jun/18  Resolved: 13/Jun/18

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

Type: Defect Priority: Major
Reporter: Mike Fikes Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None
Environment:

Windows Appveyor CI (https://ci.appveyor.com/project/mfikes/clojurescript/build/1.0.144)



 Description   
lein test :only cljs.build-api-tests/cljs-1500-test-modules
889
890ERROR in (cljs-1500-test-modules) (closure.clj:2196)
891Uncaught exception, not in assertion.
892expected: nil
893module.js:478
894    throw err;
895    ^
896
897Error: Cannot find module '@cljs-oss/module-deps'
898    at Function.Module._resolveFilename (module.js:476:15)
899    at Function.Module._load (module.js:424:25)
900    at Module.require (module.js:504:17)
901    at require (internal/module.js:20:19)
902    at [eval]:8:13
903    at ContextifyScript.Script.runInThisContext (vm.js:25:33)
904    at Object.runInThisContext (vm.js:97:38)
905    at Object.<anonymous> ([eval]-wrapper:6:22)
906    at Module._compile (module.js:577:32)
907    at evalScript (bootstrap_node.js:358:27)
908
909  actual: java.lang.AssertionError: Assert failed: :main must be a symbol, got module-test.main instead
910(symbol? main)
911 at cljs.closure$check_main.invokeStatic (closure.clj:2196)
912    cljs.closure$validate_opts.invokeStatic (closure.clj:2822)
913    cljs.closure$build.invokeStatic (closure.clj:2869)
914    cljs.build.api$build.invokeStatic (api.clj:207)
915    cljs.build.api$build.invoke (api.clj:189)
916    cljs.build.api$build.invokeStatic (api.clj:195)
917    cljs.build_api_tests$fn__12182.invokeStatic (build_api_tests.clj:145)
918    cljs.build_api_tests/fn (build_api_tests.clj:140)
919    clojure.test$test_var$fn__9365.invoke (test.clj:716)
920    clojure.test$test_var.invokeStatic (test.clj:716)
921    clojure.test$test_var.invoke (test.clj:707)
922    clojure.test$test_vars$fn__9391$fn__9396.invoke (test.clj:734)
923    clojure.test$default_fixture.invokeStatic (test.clj:686)
924    clojure.test$default_fixture.invoke (test.clj:682)
925    clojure.test$test_vars$fn__9391.invoke (test.clj:734)
926    clojure.test$default_fixture.invokeStatic (test.clj:686)
927    clojure.test$default_fixture.invoke (test.clj:682)
928    clojure.test$test_vars.invokeStatic (test.clj:730)
929    clojure.test$test_all_vars.invokeStatic (test.clj:736)
930    clojure.test$test_ns.invokeStatic (test.clj:757)
931    clojure.test$test_ns.invoke (test.clj:742)
932    user$eval233$fn__294.invoke (form-init2673640628592496285.clj:1)
933    clojure.lang.AFn.applyToHelper (AFn.java:156)
934    clojure.lang.AFn.applyTo (AFn.java:144)
935    clojure.core$apply.invokeStatic (core.clj:659)
936    leiningen.core.injected$compose_hooks$fn__163.doInvoke (form-init2673640628592496285.clj:1)
937    clojure.lang.RestFn.applyTo (RestFn.java:137)
938    clojure.core$apply.invokeStatic (core.clj:657)
939    leiningen.core.injected$run_hooks.invokeStatic (form-init2673640628592496285.clj:1)
940    leiningen.core.injected$prepare_for_hooks$fn__168$fn__169.doInvoke (form-init2673640628592496285.clj:1)
941    clojure.lang.RestFn.applyTo (RestFn.java:137)
942    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
943    clojure.lang.RestFn.invoke (RestFn.java:408)
944    clojure.core$map$fn__5665.invoke (core.clj:2747)
945    clojure.lang.LazySeq.sval (LazySeq.java:40)
946    clojure.lang.LazySeq.seq (LazySeq.java:49)
947    clojure.lang.Cons.next (Cons.java:39)
948    clojure.lang.RT.next (RT.java:706)
949    clojure.core$next__5186.invokeStatic (core.clj:64)
950    clojure.core$reduce1.invokeStatic (core.clj:936)
951    clojure.core$reduce1.invokeStatic (core.clj:926)
952    clojure.core$merge_with.invokeStatic (core.clj:3051)
953    clojure.core$merge_with.doInvoke (core.clj:3043)
954    clojure.lang.RestFn.applyTo (RestFn.java:139)
955    clojure.core$apply.invokeStatic (core.clj:659)
956    clojure.test$run_tests.invokeStatic (test.clj:767)
957    clojure.test$run_tests.doInvoke (test.clj:767)
958    clojure.lang.RestFn.applyTo (RestFn.java:137)
959    clojure.core$apply.invokeStatic (core.clj:657)
960    user$eval233$fn__306$fn__339.invoke (form-init2673640628592496285.clj:1)
961    user$eval233$fn__306$fn__307.invoke (form-init2673640628592496285.clj:1)
962    user$eval233$fn__306.invoke (form-init2673640628592496285.clj:1)
963    user$eval233.invokeStatic (form-init2673640628592496285.clj:1)
964    user$eval233.invoke (form-init2673640628592496285.clj:1)
965    clojure.lang.Compiler.eval (Compiler.java:7062)
966    clojure.lang.Compiler.eval (Compiler.java:7052)
967    clojure.lang.Compiler.load (Compiler.java:7514)
968    clojure.lang.Compiler.loadFile (Compiler.java:7452)
969    clojure.main$load_script.invokeStatic (main.clj:278)
970    clojure.main$init_opt.invokeStatic (main.clj:280)
971    clojure.main$init_opt.invoke (main.clj:280)
972    clojure.main$initialize.invokeStatic (main.clj:311)
973    clojure.main$null_opt.invokeStatic (main.clj:345)
974    clojure.main$null_opt.invoke (main.clj:342)
975    clojure.main$main.invokeStatic (main.clj:424)
976    clojure.main$main.doInvoke (main.clj:387)
977    clojure.lang.RestFn.applyTo (RestFn.java:137)
978    clojure.lang.Var.applyTo (Var.java:702)
979    clojure.main.main (main.java:37)
980
981lein test cljs.closure-tests
982
983lein test :only cljs.closure-tests/test-cljs-1882-constants-table-is-sorted
984
985ERROR in (test-cljs-1882-constants-table-is-sorted) (closure.clj:2196)
986Uncaught exception, not in assertion.
987expected: nil
988  actual: java.lang.AssertionError: Assert failed: :main must be a symbol, got module-test.main instead
989(symbol? main)
990 at cljs.closure$check_main.invokeStatic (closure.clj:2196)
991    cljs.closure$validate_opts.invokeStatic (closure.clj:2822)
992    cljs.closure$build.invokeStatic (closure.clj:2869)
993    cljs.build.api$build.invokeStatic (api.clj:207)
994    cljs.build.api$build.invoke (api.clj:189)
995    cljs.build.api$build.invokeStatic (api.clj:195)
996    cljs.closure_tests$fn__12567.invokeStatic (closure_tests.clj:61)
997    cljs.closure_tests/fn (closure_tests.clj:56)
998    clojure.test$test_var$fn__9365.invoke (test.clj:716)
999    clojure.test$test_var.invokeStatic (test.clj:716)
1000    clojure.test$test_var.invoke (test.clj:707)
1001    clojure.test$test_vars$fn__9391$fn__9396.invoke (test.clj:734)
1002    clojure.test$default_fixture.invokeStatic (test.clj:686)
1003    clojure.test$default_fixture.invoke (test.clj:682)
1004    clojure.test$test_vars$fn__9391.invoke (test.clj:734)
1005    clojure.test$default_fixture.invokeStatic (test.clj:686)
1006    clojure.test$default_fixture.invoke (test.clj:682)
1007    clojure.test$test_vars.invokeStatic (test.clj:730)
1008    clojure.test$test_all_vars.invokeStatic (test.clj:736)
1009    clojure.test$test_ns.invokeStatic (test.clj:757)
1010    clojure.test$test_ns.invoke (test.clj:742)
1011    user$eval233$fn__294.invoke (form-init2673640628592496285.clj:1)
1012    clojure.lang.AFn.applyToHelper (AFn.java:156)
1013    clojure.lang.AFn.applyTo (AFn.java:144)
1014    clojure.core$apply.invokeStatic (core.clj:659)
1015    leiningen.core.injected$compose_hooks$fn__163.doInvoke (form-init2673640628592496285.clj:1)
1016    clojure.lang.RestFn.applyTo (RestFn.java:137)
1017    clojure.core$apply.invokeStatic (core.clj:657)
1018    leiningen.core.injected$run_hooks.invokeStatic (form-init2673640628592496285.clj:1)
1019    leiningen.core.injected$prepare_for_hooks$fn__168$fn__169.doInvoke (form-init2673640628592496285.clj:1)
1020    clojure.lang.RestFn.applyTo (RestFn.java:137)
1021    clojure.lang.AFunction$1.doInvoke (AFunction.java:29)
1022    clojure.lang.RestFn.invoke (RestFn.java:408)
1023    clojure.core$map$fn__5665.invoke (core.clj:2747)
1024    clojure.lang.LazySeq.sval (LazySeq.java:40)
1025    clojure.lang.LazySeq.seq (LazySeq.java:49)
1026    clojure.lang.Cons.next (Cons.java:39)
1027    clojure.lang.RT.next (RT.java:706)
1028    clojure.core$next__5186.invokeStatic (core.clj:64)
1029    clojure.core$reduce1.invokeStatic (core.clj:936)
1030    clojure.core$reduce1.invokeStatic (core.clj:926)
1031    clojure.core$merge_with.invokeStatic (core.clj:3051)
1032    clojure.core$merge_with.doInvoke (core.clj:3043)
1033    clojure.lang.RestFn.applyTo (RestFn.java:139)
1034    clojure.core$apply.invokeStatic (core.clj:659)
1035    clojure.test$run_tests.invokeStatic (test.clj:767)
1036    clojure.test$run_tests.doInvoke (test.clj:767)
1037    clojure.lang.RestFn.applyTo (RestFn.java:137)
1038    clojure.core$apply.invokeStatic (core.clj:657)
1039    user$eval233$fn__306$fn__339.invoke (form-init2673640628592496285.clj:1)
1040    user$eval233$fn__306$fn__307.invoke (form-init2673640628592496285.clj:1)
1041    user$eval233$fn__306.invoke (form-init2673640628592496285.clj:1)
1042    user$eval233.invokeStatic (form-init2673640628592496285.clj:1)
1043    user$eval233.invoke (form-init2673640628592496285.clj:1)
1044    clojure.lang.Compiler.eval (Compiler.java:7062)
1045    clojure.lang.Compiler.eval (Compiler.java:7052)
1046    clojure.lang.Compiler.load (Compiler.java:7514)
1047    clojure.lang.Compiler.loadFile (Compiler.java:7452)
1048    clojure.main$load_script.invokeStatic (main.clj:278)
1049    clojure.main$init_opt.invokeStatic (main.clj:280)
1050    clojure.main$init_opt.invoke (main.clj:280)
1051    clojure.main$initialize.invokeStatic (main.clj:311)
1052    clojure.main$null_opt.invokeStatic (main.clj:345)
1053    clojure.main$null_opt.invoke (main.clj:342)
1054    clojure.main$main.invokeStatic (main.clj:424)
1055    clojure.main$main.doInvoke (main.clj:387)
1056    clojure.lang.RestFn.applyTo (RestFn.java:137)
1057    clojure.lang.Var.applyTo (Var.java:702)
1058    clojure.main.main (main.java:37)
1059
1060lein test cljs.compiler-tests

Probably https://github.com/clojure/clojurescript/blob/f81c8bb02359befda716a9348ff5a714076c97b6/src/test/clojure/cljs/test_util.clj#L43



 Comments   
Comment by David Nolen [ 13/Jun/18 2:16 PM ]

fixed https://github.com/clojure/clojurescript/commit/43bc1482c4adac00b8d1f4072d3f0b75827b172f





[CLJS-2775] cljs.main: Node modules not installed if -re node Created: 13/Jun/18  Updated: 13/Jun/18  Resolved: 13/Jun/18

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
Environment:

{:deps {org.clojure/clojurescript {:mvn/version "1.10.238"}}}


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

 Description   

The following cljs.main use fails, without node_modules being set up, etc.:

clj -m cljs.main -co '{:npm-deps {:left-pad "1.3.0"} :install-deps true}' -d out -re node -e "(require 'left-pad)" -e "(left-pad 3 10 0)"

On the other hand, if you change to -re browser, things work as expected

clj -m cljs.main -co '{:npm-deps {:left-pad "1.3.0"} :install-deps true}' -d out -re browser -e "(require 'left-pad)" -e "(left-pad 3 10 0)"
"0000000003"

And, after node_modules has been set up by the use of -re browser, the first command, based on -re node starts to succeed, so it is as if the logic to install NPM deps is perhaps simply being skipped?



 Comments   
Comment by David Nolen [ 13/Jun/18 4:40 PM ]

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





[CLJS-2774] cljs.main: load file fails if NPM deps involved Created: 13/Jun/18  Updated: 13/Jun/18

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

Type: Defect Priority: Major
Reporter: Mike Fikes Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Environment:

{:deps {org.clojure/clojurescript {:mvn/version "1.10.238"}}}



 Description   
src/foo/core.cljs
(ns foo.core
  (:require left-pad))

(defn pad [n]
  (left-pad n 10 0))

We pass -d here to work around CLJS-2752 and CLJS-2666.

$ clj -m cljs.main -co '{:npm-deps {:left-pad "1.3.0"} :install-deps true}' -d out -r
cljs.user=> (load-file "foo/core.cljs")
nil
cljs.user=> (dir foo.core)
pad
nil
cljs.user=> (foo.core/pad 3)
ReferenceError: Can't find variable: foo
cljs.user=> (require 'foo.core)

cljs.user=> (foo.core/pad 3)
"0000000003"

Note that load-file fails (even though it can succeed; see CLJS-2753), while require succeeds.






[CLJS-2773] cljs.main: Extra out directory in path for load-file Created: 13/Jun/18  Updated: 13/Jun/18  Resolved: 13/Jun/18

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

Type: Defect Priority: Minor
Reporter: Mike Fikes Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Environment:

{:deps {org.clojure/clojurescript {:mvn/version "1.10.238"}}}



 Description   

When using load-file from a cljs.main REPL, you end up with an extra out in the compiled file path. Otherwise, things work.

src/foo/core.cljs
(ns foo.core)

(def x 3)

We pass -d here to work around CLJS-2752.

$ clj -m cljs.main -co '{:verbose true}' -d out -r
cljs.user=> (load-file "foo/core.cljs")
...
Compiling /Users/mfikes/Desktop/load-file/src/foo/core.cljs to out/out/foo/core.js
nil
cljs.user=> foo.core/x
3


 Comments   
Comment by Mike Fikes [ 13/Jun/18 9:18 AM ]

Duplicate of CLJS-2753.





[CLJS-2772] Trying to run `cljs.main` repl with `:modules` results in `brepl_deps.js` being `clojure.lang.LazySeq`. Created: 12/Jun/18  Updated: 15/Jun/18  Resolved: 15/Jun/18

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

Type: Defect Priority: Major
Reporter: Garrett Hopper Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None


 Description   

`clj -A:cljs -co '{:modules {:cljs-base {:output-to "out/base.js"}}}'`



 Comments   
Comment by Garrett Hopper [ 12/Jun/18 10:20 PM ]

It appears the actual issue here is that `cljs.closure/build` returns `(nil)` when `opts` includes any value for `:modules`.

Comment by David Nolen [ 15/Jun/18 3:23 PM ]

fixed https://github.com/clojure/clojurescript/commit/343e6aef57b802975fca3fb5fa0fd85a20330d66





Generated at Tue Jun 19 07:40:40 CDT 2018 using JIRA 4.4#649-r158309.