This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-21
Channels
- # announcements (2)
- # asami (8)
- # aws (4)
- # beginners (32)
- # calva (12)
- # cider (72)
- # clj-kondo (16)
- # clojure (11)
- # clojure-germany (2)
- # clojure-italy (4)
- # clojure-serbia (2)
- # clojurescript (26)
- # data-oriented-programming (8)
- # datomic (9)
- # deps-new (17)
- # eastwood (4)
- # emacs (20)
- # fulcro (18)
- # funcool (1)
- # graalvm (8)
- # leiningen (12)
- # lsp (34)
- # malli (25)
- # meander (4)
- # membrane (4)
- # off-topic (153)
- # practicalli (1)
- # releases (2)
- # remote-jobs (3)
- # rewrite-clj (77)
- # ring (5)
- # shadow-cljs (108)
- # spacemacs (12)
- # tools-deps (9)
- # vscode (11)
- # xtdb (4)
Just noticed this issue:
Can't parse /Developer/workspace/clj-new/src/clj/new/app/deps.edn, No value supplied for key: namespace clj-kondo (syntax)
for this deps.edn
file (which is a template in clj-new
):
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.10.3"}}
:aliases
{:run-m {:main-opts ["-m" "{{namespace}}"]}
:run-x {:ns-default {{namespace}} ; complaining about this
:exec-fn greet
:exec-args {:name "Clojure"}}
...
This is a Stencil template (but Selmer and others use the same syntax). Not sure if it’s possible to work around this since it’s a parsing issue at the EDN level but I thought I’d mention it in case…@seancorfield If the file ends with .edn, clj-kondo will treat it as edn
Right, I meant more “Could clj-kondo understand that {{sym}}
is a template var and still parse the file?“.
Also, while you’re here — I just ran across this:
(ns kondo.reducers
(:require [clojure.core.reducers :as r]))
(defn map-test []
(r/map inc [1 2 3 4]))
;^ r/map flagged as an unresolved var
that would require a change in the parser, which imo isn't worth it. the r/map issue will be fixed in the newest clj-kondo which I'm about to release
Oh, good timing on my part then 🙂
Yeah, I figured it wouldn’t be worth fixing the EDN parse issue. I was just curious if anyone else had run into it.
(which wouldn’t solve that parsing issue but… 🙂 )
I just had a pain with lein updating the clj-kondo LSP plugin. Turns out I had clj-kondo in my .lein/profiles.clj as well, so it had included an older version for a while.
lein with-profiles -user
fixes this.. 
clj-kondo v2021.03.22: no new features, just bug fixes. https://github.com/clj-kondo/clj-kondo/blob/master/CHANGELOG.md#20210322
@seancorfield I guess a quick hack for templates would be to str/replace all {{ ... }}
s with e.g. nil
and then lint it as .edn. But how would you tell clj-kondo that it should do that.