Fork me on GitHub
#hyperfiddle
<
2023-06-15
>
Amos09:06:10

Hi, this is the datalevin version for the electric starter app. It is similar to the datascript version, but datalevin has durable storage. https://github.com/amos814/electric-starter-datalevin

👍 9
s-ol10:06:14

it says > This Entity API is new and can be improved. I would be curious too hear if anyone has tried using this

J13:06:18

Hi! I have a Remote error - 1011 Server process crash but no logs on fly and localy (when I run the prod jar). What is the way to display the error?

2
xificurC13:06:33

are you saying the server logs show no error?

xificurC13:06:20

do you see the same behavior during dev development?

J13:06:51

During dev, I have no Remote error - 1011 Server process crash

J13:06:19

The error occur when I run the uberjar.

xificurC13:06:34

ok, that's not good 🙂 It's hard to say where the issue is in the stack (electric, shadow, cljs, gcc)

xificurC13:06:00

the prod jar starts up and the jvm keeps running?

J13:06:04

But the ui crash and disappear.

xificurC13:06:16

hyperfiddle.electric-jetty-adapter has this handler

(defn failure [^WebSocketAdapter ws ^Throwable e]
  (if (instance? Cancelled e)
    (log/debug "Websocket handler completed gracefully.")
    (do (log/error e "Websocket handler failure")
        ;; jetty/close! is missing arity 3 for jetty 9. Call close directly to get arity 3.
        (when-some [s (.getSession ws)] (.close s 1011 "Server process crash")))))
which logs the exception. Are you using this adapter? What version of jetty are you using?

xificurC13:06:15

do you see any logs? The adapter requires [clojure.tools.logging :as log] to log

J13:06:33

Yes I use this setup

J13:06:07

Maybe it’s my log setup don’t work

J13:06:14

I have taoensso/timbre too, can he have conflict?

xificurC13:06:57

JVM logging is close to quantum physics in complexity

J13:06:15

Haha ^^

J13:06:37

I have this when I run the uberjar.

xificurC13:06:12

I'd put a log/info call in an app ns you use and see if the log appears in the server logs

xificurC13:06:20

in dev first. If you have a logback.xml setup and ch.qos.logback/logback-classic in your deps.edn you need to check if logback.xml is on the classpath for the prod build as well

xificurC13:06:12

there's also https://github.com/fzakaria/slf4j-timbre if you want to bridge slf4j logs to timbre

J13:06:56

If logback.xml is in a resources it’s ok?

xificurC13:06:42

if resources is included on the classpath

J14:06:20

Ok it’s my logger! I will check this mess ^^ Thanks @U09FL65DK

😉 2
Dustin Getz02:06:06

@U051SPP9Z also reported problems with logging, maybe one or all of the starter apps are misconfigured

J07:06:18

@U09K620SG I just test the logging on the electric-starter-app and it’s work 👌

👍 2
Jacob O'Bryant16:06:32

Just finished tying up the loose ends on this fyi! https://clojurians.slack.com/archives/C8NUSGWG6/p1686847699354179

clojure-spin 6
👍 10
denik18:06:50

did the recent release break keyword classes? E.g.

(dom/div (dom/props {:class [:flex]}))
just upgraded and they don’t seem to work anymore

Dustin Getz18:06:34

not on purpose, we will investigate

👌 2
Dustin Getz13:06:27

Its fixed in master, releasing soon

🙏 2
Dustin Getz17:06:06

It's published: https://github.com/hyperfiddle/electric/blob/master/CHANGELOG.md We will announce the release after we double check the demos more carefully, because there were other changes

🙏 1
Vincent21:06:30

Question: is there a ui/radio-button ? I dunno where to find the ui lib source code x)

Vincent23:06:59

actually, even better might be to state my use-case: customers can choose a "tier" of membership at sign-up. want a way to select between the several.

Dustin Getz02:06:14

i don’t think we have radio yet, it’s straightforward to make but i will warn you that HTML radios are very fiddly

Dustin Getz02:06:39

might i suggest a large button or a hyperlink, or even an airtable form, or using a site generator type tool for the marketing/sales pages

Vincent02:06:12

yeah radio buttons are a nightmare lol i was thinking maybe i can avoid this x)

s-ol10:06:41

I think you can get the same behaviour quite easily with multiple checkboxes (that can be styled to communicate exclusivity) as well

Vincent16:06:28

@U05AL1ZH8TW that occurred to me when looking at the todo list example again, i think this is a good idea too