This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-01
Channels
- # aleph (6)
- # announcements (37)
- # aws (1)
- # beginners (67)
- # calva (9)
- # clerk (5)
- # clj-kondo (3)
- # clojure (19)
- # clojure-europe (40)
- # clojure-nl (1)
- # clojure-norway (36)
- # clojure-uk (5)
- # clojuredesign-podcast (7)
- # clojurescript (28)
- # datomic (9)
- # emacs (8)
- # figwheel-main (4)
- # fulcro (6)
- # hyperfiddle (19)
- # integrant (4)
- # java (9)
- # lsp (131)
- # malli (9)
- # missionary (85)
- # off-topic (13)
- # pathom (3)
- # polylith (11)
- # releases (1)
- # sci (4)
- # shadow-cljs (7)
- # specter (2)
- # vscode (1)
- # xtdb (2)
morning
Good morning!
Good morning ☕️
@borkdude I just tried applying carve
to our frontend and was very excited to see thousands of lines of code removed. But then I reviewed the results, and there was lots of used component fns removed. Does clj-kondo
/`carve` not "understand" hiccup "usage" of component fns?
ie [my-component-fn arg1 arg2]
yes, it should understand such usages, similar to when you just write:
(defn foobar [])
foobar
it doesn't matter if the var is used from a vector or not, so hiccup seems irrelevantjawohl
Further investigation is required 🙂
I tried to carve this file:
(ns scratch)
(defn foobar [])
;; foobar
it only reports foobar if I don't remove the ;;
and for this example, it only reports dude
:
(ns scratch)
(defn foobar [])
(defn dude []
[foobar])
I used :aggressive true
, btw
ah yes, in that case you need to define at least some entry-points because if you don't use any entry-point everything is unused by definition
oohhhh my bad then!
Sorry!
To be precise, my command was
clj -Tcarve carve! '{:paths ["src"] :interactive false :aggressive true}'
Try to add :ignore-vars [...]
with a list if vars that are the starting point of your app
yeah 🙂 I'll experiment more.
Hahaha ok ok ok, now only 835 lines were removed x)
I mean, still something to be gained, and in particular by having automated the process!
And this is only our /frontend
project, there's a lot of other projects to try out 🙂
hello, any Clojure people going to FOSDEM this year? Would like to meet face to face for beer or beverage of choice 🙂 . Ping me here or via Mastodon: @[email protected]