This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-11
Channels
- # announcements (1)
- # babashka (70)
- # beginners (8)
- # calva (5)
- # cider (9)
- # clojure (48)
- # clojure-austin (68)
- # clojure-europe (29)
- # clojure-norway (30)
- # clojure-uk (5)
- # clojuredesign-podcast (2)
- # cursive (19)
- # datomic (10)
- # emacs (11)
- # events (2)
- # exercism (4)
- # fulcro (2)
- # hyperfiddle (29)
- # introduce-yourself (2)
- # jobs-discuss (4)
- # kaocha (1)
- # leiningen (8)
- # lsp (8)
- # malli (2)
- # matcher-combinators (20)
- # nrepl (15)
- # off-topic (33)
- # reagent (7)
- # releases (4)
- # shadow-cljs (42)
- # spacemacs (6)
- # sql (6)
- # squint (10)
- # vim (3)
Yes, see: https://clojurians.slack.com/archives/C7Q9GSHFV/p1704967833668529
i keep getting this error, on ic for electric-starter-app but on master for not
Exception in thread "main" clojure.lang.ArityException: Wrong number of args (1) passed to: app.electric-server-java8-jetty9/start-server!
at clojure.lang.AFn.throwArity(AFn.java:429)
at clojure.lang.AFn.invoke(AFn.java:32)
at prod$_main.invokeStatic(prod.clj:13)
at prod$_main.doInvoke(prod.clj:10)
at clojure.lang.RestFn.invoke(RestFn.java:400)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:135)
at prod.main(Unknown Source)
they added another arg to that function so check that you're calling it with two args, entrypoint
and config
The entrypoint is the function booting your Electric program. It looks like this:
(fn [ring-request]
(e/boot-server {} your-ns/Your-e-defn ring-request))
See https://github.com/hyperfiddle/electric-fiddle/blob/cf6134adb6aa0a4ae2f678961e54036f867cd4d4/src/electric_fiddle/server_httpkit.clj#L14-L39 and https://github.com/hyperfiddle/electric-fiddle/blob/cf6134adb6aa0a4ae2f678961e54036f867cd4d4/src-dev/dev.cljc#L42Also see the https://clojurians.slack.com/archives/C7Q9GSHFV/p1704967833668529 for simpler entrypoints and simpler ring integration.
they added another arg to that function so check that you're calling it with two args, entrypoint
and config
New Electric mvn release {:mvn/version "v2-alpha-540-ga4699532"}
.
This is a breaking release.
• Simpler websocket integration – https://github.com/hyperfiddle/electric/blob/master/CHANGELOG.md#v2-alpha-540-ga4699532--2024-jan-10
◦ Leverages Ring 1.11+ websocket support for simpler ring integration.
◦ Examples for https://github.com/hyperfiddle/electric-fiddle/blob/cf6134adb6aa0a4ae2f678961e54036f867cd4d4/src/electric_fiddle/server_jetty.clj#L15-L33 and https://github.com/hyperfiddle/electric-fiddle/blob/cf6134adb6aa0a4ae2f678961e54036f867cd4d4/src/electric_fiddle/server_httpkit.clj#L14-L39
• Incremental Compilation is included too – https://github.com/hyperfiddle/electric/blob/master/CHANGELOG.md#v2-alpha-536-g0c582f78--2024-jan-10
◦ TL;DR: Electric used to compile the whole program at once, resulting in long recompilation times in dev mode. Your hot code reload should now be snappy again.
@U6D1FU8F2 This will answer your question from the above thread. Electric-starter-app is now deprecated in favor of https://github.com/hyperfiddle/electric-fiddle/
@U2DART3HA I don’t think the initial IC release was announced in #C06MAR553, so maybe it’s a good opportunity for some promotion of the great work you do?
Thank you
But let's wait for feedback a bit, and plan broader announcements as a team first ;)
thanks @U2DART3HA! what is the difference?
The difference between electric-starter-app
and electric-fiddle
?
Thank you @U2DART3HA 🙂
I will drop this into my deps.edn later on and let you know if I encounter any issues
@U2DART3HA yes! trying to determine if to migrate
Electric Fiddle is the new, easier way to get started with Electric Clojure. We won’t update electric-starter-app
anymore. It is worth migrating if
• you plan to integrate updates from the our upstream repo
• your project has not diverged that much from the starter app
Migrating should not take long:
• move your source code to src-fiddles/your-project
• copy the structure from src-fiddles/hello-fiddle
◦ especially fiddles.cljc
• add your extra deps under an alias in deps.edn
• move your resources in resources
• try to run in dev mode (see readme)
• try to run in prod mode (see readme)
Thank you for your feedback. User code go to src-fiddle, src contains electric-fiddle's source code.
for every other project i jump into src, but if it's different for electric fiddle it'll be highly confusing
We acted on your feedback. src
is now the default place to put user code into. Thank you 👍
I noticed a switch also to using npm install
over yarn
tbh I haven't really had much of a strong preference and started using yarn because thats what everyone else was doing. Is there a reason for the switch?
Also is the submodule folder / vendoring now not relevant and you are using deps to manage dependencies?
The only reason we used yarn
over npm install
was because it’s faster. There was confusion over what yarn
means, but there was no confusion over what npm install
means.
You can use either. Up to you.
> is the submodule folder / vendoring now not relevant and you are using deps to manage dependencies?
yes