Fork me on GitHub
#hyperfiddle
<
2024-01-03
>
andrea.crotti15:01:01

Am I the only one getting this sort of errors? I was just trying to run locally either: https://github.com/hyperfiddle/electric-starter-app or https://github.com/hyperfiddle/electric-xtdb-starter and tried with jdk 11/17/21 but I always get this error

Caused by: java.lang.NoClassDefFoundError: com/google/common/collect/Streams
	at com.google.javascript.jscomp.deps.ModuleLoader.createRootPaths(ModuleLoader.java:259)
	at com.google.javascript.jscomp.deps.ModuleLoader.<init>(ModuleLoader.java:154)
	at com.google.javascript.jscomp.deps.ModuleLoader$Builder.build(ModuleLoader.java:146)
	at com.google.javascript.jscomp.deps.ModuleLoader.<clinit>(ModuleLoader.java:414)
	at com.google.javascript.jscomp.DiagnosticGroups.<clinit>(DiagnosticGroups.java:178)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized0(Native Method)
	at java.base/jdk.internal.misc.Unsafe.ensureClassInitialized(Unsafe.java:1160)
	at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.ensureClassInitialized(MethodHandleAccessorFactory.java:300)
	at java.base/jdk.internal.reflect.MethodHandleAccessorFactory.newMethodAccessor(MethodHandleAccessorFactory.java:71)
	at java.base/jdk.internal.reflect.ReflectionFactory.newMethodAccessor(ReflectionFactory.java:159)
	at java.base/java.lang.reflect.Method.acquireMethodAccessor(Method.java:726)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:167)
	at clojure.lang.Compiler$StaticMethodExpr.eval(Compiler.java:1726)
	... 211 more
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Streams
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 225 more

andrea.crotti15:01:15

hehe dammit it was one of the libraries I had in my ~/.clojure/deps.edn causing some sort of conflict

πŸ˜… 1
Vincent18:01:31

oh hell yeah

Vincent18:01:35

glad you got it resolved

Vincent18:01:41

it's always nice when it's simple stuff like that

Dustin Getz18:01:33

this is a common known ClojureScript issue, you'll get a number of hits if you search the broader slack (some in this channel)

Vincent18:01:05

Moving very fast with Electric, a three day memoir...

Vincent18:01:31

I thought I would use Rum to develop Shomp -- our application to help musicians and creators have perpetually free online storefronts -- and i thought to use Rum because we can have serverside rendering out of the box via (rum/render-html) and (rum/hydrate). However, after smashing my head against a wall for days, working on connecting front end and back end APIs in a "beautiful, reusable 'datomic push' syntax" way, I found myself reaching for Electric patterns in a non-electric land. So i bit the bullet and decided to start writing the application in Electric instead. Not disappointed, developing the app with Electric has proven to be: more fun, and simpler to reason about. Late last night I just got the one time passcodes via text message sending. Apparently small things like "putting a url in a text message" will invisibly filter the message on the network and never deliver -- you can imagine the tech support email chain around mysterious undefined behavior lol. I decided that we can still implement an inexpensive and robust SEO solution that google can use when learning about new pages, and real users can hit the Electric application directly. I think that as long as I can provide meta-description and those meta tags for the SEO bots it will be quite alright on the search engine side. Anyway, gotta say, it's really hard to go back to "last generation tooling" once you've made a couple projects hum along smoothly in Electric lady land. It really is the perfect (approaching perfection) medley of capabilities to create, in exceptionally rapid fashion, a proof of concept that is easily massaged into a minimum viable demo and subsequently minimum viable product. Coding live and in production like a cowboy. Yee haw. There are many ways to view what is happening, in one way of looking at it, Electric Clojure lets you "bolt on" the amenities and functionality of the server directly into the client/clientside/the browser. This transparent reference to the methods and collections (data) on the server is invaluable. Another way is to consider that you can make a multiplayer-enabled app out of the box, which might be a great fit for some use-cases.

πŸ’― 1
πŸ™‚ 1
1
Dustin Getz21:01:12

Thanks for the review, I especially appreciate that you tried to do it the other way! Electric is not perfect yet and it's hard to get a fair comparison

markaddleman22:01:21

I think I found a typo in the electric-fiddle readme. I believe

(dev/load-fiddle! 'my-fiddle)
should be
(dev/load-fiddle! 'my-fiddles)
(note the β€œs”)

πŸ‘€ 2
βœ… 1
Geoffrey Gaillard13:01:19

Fixed. Thank you for the report. You are right, 'my-fiddle was sometimes singular and sometimes plural. Now it’s all singular.

πŸ™ 1