Fork me on GitHub
#clojurescript
<
2019-07-02
>
fadrian00:07:14

I think I've I've got it now. I'll try the things you've mentioned. Thanks for helping me out.

lilactown00:07:37

it’s complex. reagent (and react) components don’t act like normal functions. there is some magic that takes an “element” (a React element, or a reagent hiccup vector) and eventually calls the function. but there are things happening behind the scenes so that it can do things like only re-render a component that is subscribed to changes

fadrian00:07:11

Yes. I'd like to know more about what's happening so I don't get caught flat-footed again. Do you know of any good references? By the way, what you told me about fixed the issue I was having. Thanks again.

mfikes01:07:06

@deleted-user The language itself certainly hasn't changed. You can skim though the news items at https://clojurescript.org/news/news

mfikes01:07:19

Nothing around async has changed

oskarkv18:07:10

If I run cljs.main and require the following, I get no indication that anything went wrong.

(ns cljsissues.core)
(assert false "FAILED ASSERT")
(throw "THREW")
(def something 123)
Ran like this:
> rlwrap clojure -m cljs.main -r
ClojureScript 1.10.520
cljs.user=> (require '[cljsissues.core])
nil
cljs.user=> *e
nil
cljs.user=> cljsissues.core/something
nil
Obviously it would be great if I got a message about the failed assert of the throw. But I don't get anything about either. Using only throw or only assert also has the same behavior, and if I remove both then something becomes 123 as expected. In Clojure it "works":
> rlwrap clojure
Clojure 1.10.1
user=> (require '[cljsissues.clj])
Syntax error (AssertionError) compiling at (cljsissues/clj.clj:3:1).
Assert failed: FAILED ASSERT
false

mfikes20:07:07

Probably worth a JIRA @oskarkv

mfikes20:07:03

It is likely fixable. Here is Planck, for example:

plk
ClojureScript 1.10.520
cljs.user=> (require '[cljsissues.core])
Execution error (Error) at (<cljs repl>:1).
Assert failed: FAILED ASSERT
false

mfikes20:07:10

Ahh, maybe this is one of those things that's hard to catch owing to asynchronous loading in the browser. It seems OK with Node:

$ clj -m cljs.main -re node -r
ClojureScript 1.10.520
cljs.user=> (require '[cljsissues.core])
Execution error (Error) at (<cljs repl>:1).
Assert failed: FAILED ASSERT
false