This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-05-13
Channels
- # aleph (6)
- # announcements (10)
- # asami (3)
- # babashka (111)
- # babashka-sci-dev (20)
- # beginners (28)
- # calva (28)
- # clj-http (1)
- # clj-kondo (23)
- # cljs-dev (16)
- # cljsrn (23)
- # clojure (116)
- # clojure-czech (3)
- # clojure-europe (33)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (5)
- # clojurescript (41)
- # community-development (2)
- # cursive (5)
- # datahike (4)
- # datomic (13)
- # figwheel-main (3)
- # fulcro (11)
- # google-cloud (1)
- # gratitude (8)
- # hyperfiddle (14)
- # jobs (2)
- # lsp (22)
- # malli (4)
- # off-topic (4)
- # other-languages (4)
- # pathom (13)
- # portal (40)
- # rdf (11)
- # reitit (1)
- # sci (15)
- # shadow-cljs (7)
- # specter (1)
- # sql (6)
- # xtdb (4)
hi folks, how to please clojurescript and javascript and generate #js literal string with " inside ? The code below pleases clojure but generates throws unknow identifier caboom on js side
(js/console.log #js {"maybe identifier \"caboom\" " true})
That's it! Thank you @dnolen
Hello, since we updated to 1.11.4, set!
on functions doesn't work anymore. It seems that it has to exactly match the arity configuration of the set'ed function, otherwise Object.keys(re_frame.core.subscribe)
returns an empty array. It used to work, was that an intended change?
(we use set!
on library functions for debugging purposes)
@quentin.leguennec1 can you be more clear, set!
on functions doesn't really make sense to me
yes, I think so.
in that specific case, re-frame.core/subscribe
which maps to re_frame.core.subscribe
in javascript
fwiw, if you are set!
-ing at the REPL it should work, if you're talking about optimized fns builds (which include :advanced
) this was never something that was supposed to work, and if it did work that was accident and not going to change anything here.
I've just released ClojureScript 1.11.51, before a bigger announce it be helpful for folks who have time to give it a try
I have a strange problem with citrus/rum where the args to the defc components aren't "delivered " correctly.
When I downgrade to cljs 1.11.4 everything works as expected.
The smallest example would be:
(ns frontlyft.repro
(:require
[citrus.core :as citrus]
[goog.dom :as dom]
[rum.core :as rum]))
(defn control [event args state]
{:state (update state :number (fnil 0 inc))})
(defonce reconciler
(citrus/reconciler
{:state (atom {})
:controllers {:repro control}
:effect-handlers {}}))
(rum/defc smol-component < rum/reactive
[r]
[:div [:h1 "smoll life"]
[:p (str (rum/react (citrus/subscription r [:repro :number])) )]])
(defn ^:export run [m]
;; (let [r reconciler])
(rum/hydrate (smol-component reconciler)
(dom/getElement "app")))
where there obv is a webserver responing with a html page with an "app" tag, and running a frontlyft.repro.run({})
stacktrace
Uncaught Error: Assert failed: (instance? r/Reconciler reconciler)
cljs$core$IFn$_invoke$arity$3 core.cljs:117
citrus$core$subscription core.cljs:117
cljs$core$IFn$_invoke$arity$2 core.cljs:128
citrus$core$subscription core.cljs:117
smol_component repro.cljs:17
cljs$core$IFn$_invoke$arity$3 core.cljs:3941
cljs$core$IFn$_invoke$arity$2 core.cljs:3936
cljs$core$IFn$_invoke$arity$2 core.cljs:3971
cljs$core$apply core.cljs:3962
render core.cljs:208
reactive core.cljs:424
build_class core.cljs:112
React 17
rum$core$hydrate core.cljs:287
frontlyft$repro$run repro.cljs:26
<anonymous> (index):6
core.cljs:117
The assertation is: https://github.com/clj-commons/citrus/blob/master/src/citrus/core.cljs#L130
Buildscript:
{:main frontlyft.repro
:asset-path "/js/frontlyft/compiled/out"
:output-to "cljs-resources/public/js/frontlyft/compiled/frontlyft.js"
:output-dir "cljs-resources/public/js/frontlyft/compiled/out"
:language-in :ecmascript-next
:warnings true
:language-out :no-transpile}
The app starts when i replace r
with reconciler
(ie don't care about about the argument passed to smol-component
,
I assume some part of cljs has changed so that citrus (or rum) get broken. Make this could happen orthers as well..
I can send a whole project.clj file but not here.
If you want to pinpoint the commit that breaks for you that would be a good first step
I’m getting Could not locate vendor/bridge__init.class, vendor/bridge.clj or vendor/bridge.cljc on classpath
That one seems a bit odd since no one reported that and I did some basic checking, can you look inside the jar and confirm it is missing?
Actually I’m wrong. The problem is still happening. So I guess I’ll just explore some more
happy to fix it up - not a surprise is something snuck through, might be cool to just dummy check w/ ClojureScript by itself too
{:clojure.main/message
"Execution error (FileNotFoundException) at cljs.repl/repl* (repl.cljc:1060).\nCould not locate vendor/bridge__init.class, vendor/bridge.clj or vendor/bridge.cljc on
classpath.\n",
:clojure.main/triage
{:clojure.error/class java.io.FileNotFoundException,
:clojure.error/line 1060,
:clojure.error/cause
"Could not locate vendor/bridge__init.class, vendor/bridge.clj or vendor/bridge.cljc on classpath.",
:clojure.error/symbol cljs.repl/repl*,
:clojure.error/source "repl.cljc",
:clojure.error/phase :execution},