hyperfiddle

jdhollis 2025-01-21T23:00:07.813109Z

Hi, all. I’ve been trying to integrate the v3 starter into my existing Polylith workspace, but I’m getting a Can't take value of macro hyperfiddle.electric3/server warning when I fire up the server from the REPL.

jdhollis 2025-01-22T20:23:07.805169Z

Hmm. Would everything related to Electric need to be CLJC?

jdhollis 2025-01-22T20:24:01.546479Z

I broke the server out into regular CLJ, so I have no mixed namespaces besides the pure Electric Main component.

Dustin Getz (Hyperfiddle) 2025-01-22T20:26:58.080579Z

I dont remember the details, but this is definitely a flag and i would go make sure your configuration matches the working starter app exactly

Dustin Getz (Hyperfiddle) 2025-01-22T20:27:23.345939Z

e/defn is cljc only currently

Dustin Getz (Hyperfiddle) 2025-01-22T20:27:50.440809Z

in a client/server configuration at least ... i dont recall the details

jdhollis 2025-01-22T20:35:01.860239Z

Ah. Figured it out.

jdhollis 2025-01-22T20:36:26.355179Z

Converted to CLJC and used reader conditionals to separate out the client require and the client entry point. Compiled with no issue.

jdhollis 2025-01-22T20:36:47.247609Z

Guessing that going with CLJS was messing up the hyperfiddle.electric3 require.

jdhollis 2025-01-22T20:39:12.667929Z

Now seeing a different issue, but I'll spend some time debugging before bothering you with it.

jdhollis 2025-01-22T20:39:36.846689Z

Although, real quick—should one see reactor failures? Or under what conditions?

jdhollis 2025-01-22T20:40:16.451729Z

Reactor failure on reload after a change.

Dustin Getz (Hyperfiddle) 2025-01-22T20:51:17.511529Z

it means the process terminated, which is normal

jdhollis 2025-01-22T20:51:44.688219Z

System properties tutorial is working like a charm.

jdhollis 2025-01-22T20:53:37.188999Z

Haven't worked with CLJC before. Usually my projects have been split between CLJ and CLJS.

jdhollis 2025-01-22T21:05:15.978939Z

Rereading the reader conditional docs. Guessing the change in syntax for requiring macros in CLJ vs CLJS may have been the issue.

jdhollis 2025-01-22T21:05:30.725449Z

In any case, time to start building 🙂

jdhollis 2025-01-21T23:00:31.784799Z

jdhollis 2025-01-21T23:00:44.445519Z

I can load the app in the browser, but hot reload results in the warning in the browser (forcing a hard reload to see changes).

jdhollis 2025-01-21T23:00:50.362339Z

I’ve separated out the server and app (Electric) into their own namespaces.

jdhollis 2025-01-21T23:00:59.150049Z

jdhollis 2025-01-21T23:01:32.373259Z

This is the app entrypoint. Basically, copy-paste from the starter (minus the do).

jdhollis 2025-01-21T23:01:49.212039Z

Not really sure where to start with debugging this. What am I missing?

jdhollis 2025-01-21T23:02:14.366189Z

Gotta be something silly 😛

Dustin Getz (Hyperfiddle) 2025-01-22T01:30:57.134409Z

i have no insights

Dustin Getz (Hyperfiddle) 2025-01-22T01:31:25.357629Z

the way i would approach this is to clone a fresh starter app and validate it works, and then audit the polylith integration line by line, ideally using a diff tool to prevent human error

➕ 1
Dustin Getz (Hyperfiddle) 2025-01-22T01:32:42.577789Z

if you don't think it could be that - check file extensions, .clj vs .cljc, etc