This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-26
Channels
- # adventofcode (2)
- # announcements (7)
- # babashka (20)
- # beginners (77)
- # brompton (6)
- # calva (4)
- # clj-kondo (28)
- # clj-together (1)
- # cljdoc (2)
- # cljfx (10)
- # cljsrn (1)
- # clojure (77)
- # clojure-europe (33)
- # clojure-gamedev (12)
- # clojure-uk (11)
- # clojurescript (95)
- # clojureverse-ops (4)
- # core-async (4)
- # core-logic (1)
- # cryogen (2)
- # cursive (14)
- # data-science (3)
- # datomic (47)
- # duct (1)
- # emacs (7)
- # fulcro (51)
- # gratitude (8)
- # helix (14)
- # hoplon (4)
- # improve-getting-started (60)
- # jobs (1)
- # jobs-discuss (4)
- # joker (11)
- # lsp (99)
- # meander (62)
- # membrane (5)
- # news-and-articles (3)
- # off-topic (64)
- # pathom (3)
- # polylith (11)
- # practicalli (7)
- # react (1)
- # reagent (8)
- # reveal (15)
- # shadow-cljs (78)
- # specter (7)
- # sql (16)
- # tools-build (1)
- # tools-deps (29)
- # workspaces (1)
- # xtdb (17)
$ clj -Sdeps '{:deps {com.rpl/specter {:mvn/version "1.1.3"}}}'
Clojure 1.10.3
user=> (use 'com.rpl.specter)
nil
user=> (setval (compact :a :b :c) NONE {:a {:b {:c 1}}})
:com.rpl.specter.impl/NONE
user=> (multi-transform (compact :a :b :c (terminal-val NONE)) {:a {:b {:c 1}}})
Execution error (IllegalArgumentException) at com.rpl.specter.navs/if-transform (navs.cljc:412).
Don't know how to create ISeq from: clojure.lang.Keyword
Is this intended behavior? Is compact not designed to work with multi-transform?Also hey @nathanmarz I heard from borkdude that you've started using clj-kondo. I use specter a lot, and I'd be open to working on a proper config with support for hooks for a lot of the macros for making custom navigators. Would you be open to adding that properly to specter as resources, or should I be looking at making a pr in clj-kondo/config?
@suskeyhose that's just because of how compact
works – it's trying to compact the result of terminal-val
, which is NONE
the error is because that's not a collection
the way to write that would be: (multi-transform [:a (compact :b :c) (terminal-val NONE)] {:a {:b {:c 1}}})
I think it's better to add that to clj-kondo rather than specter
aaah, I see