This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-22
Channels
- # beginners (104)
- # bitcoin (1)
- # boot (5)
- # clara (3)
- # cljs-dev (14)
- # cljsjs (5)
- # cljsrn (1)
- # clojure (242)
- # clojure-italy (17)
- # clojure-news (13)
- # clojure-norway (3)
- # clojure-russia (101)
- # clojure-spec (41)
- # clojure-uk (87)
- # clojurescript (38)
- # core-async (38)
- # cursive (6)
- # datomic (11)
- # defnpodcast (3)
- # docs (14)
- # editors (8)
- # events (1)
- # fulcro (7)
- # hoplon (25)
- # leiningen (4)
- # luminus (7)
- # off-topic (25)
- # onyx (1)
- # portkey (14)
- # random (1)
- # re-frame (7)
- # reagent (4)
- # rum (4)
- # schema (8)
- # shadow-cljs (257)
- # spacemacs (10)
- # specter (4)
- # unrepl (3)
- # yada (1)
hi guys, I got this error while compiling my project with
[org.clojure/clojure "1.9.0-alpha20"]
[org.clojure/clojurescript "1.9.908"]
in advanced mode.
Sep 22, 2017 11:15:36 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/nxqd/dev/project1/resources/public/js/production/out/cljs/core.js:3579: ERROR - Parse error. primary expression expected
case ##Inf:
^
Sep 22, 2017 11:15:36 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: /Users/nxqd/dev/project1/resources/public/js/production/out/cljs/test.js:257: ERROR - Parse error. ']' expected
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [##NaN,##NaN], null);
^ok, i see a jira ticket for this : https://dev.clojure.org/jira/browse/CLJS-2352
@ghopper I ran into this before. You can use ns name + var name instead of hash
+ that’s more readable for debugging
What produces the test.js file? Is that present in all cljs projects or is it made from one of my files? In my project it contains a:
return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [##NaN,##NaN], null);
But the project seems to run fine either way.@rovanion Look near the top of your test.js
file and see if it starts with a comment like
// Compiled by ClojureScript 1.9.908
and if so, look for a call to goog.provide
near the top to see which namespace it is associated with.It is compiled by the cljs compiler and provides cljs.test. So that would be a clojurescript core library ns right?
The weird thing is that I don't use cljs.test in any of my source files. Time to check lein deps :tree:
cljs.test comes with cljs - or do you mean you want to know which code is actually using it/
because deps :tree won't show who uses it either
it's part of cljs, so as far as lein is concerned everyone is using it who uses cljs
Bah, I can't seem to shake this issue with ##NaN in the compiled js. Even though the repl says I'm on alpha17 and I've run lein clean
and restarted figwheel about 50 times.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all
@rnagpal goog.promise/all
should work. Your CLJS compilation most likely already has goog.promise pulled in since it's a very common dependency.
@rnagpal Here is a nice post on how to do promise.all with core.async: http://clojurescriptmadeeasy.com/blog/promises-with-core-async.html
In core.async this also does pretty much the same thing as Promise.all: (async/map vector chans)
laziness issues? @jstew
With map. Early on in my core.async adventures I made a big seq of threads
and thought I could just map
the results with clojure.core/map. It was giving me unexpected results until I forced evaluation. But I was doing it all wrong anyway.
yeah, asyn/map takes and returns channels