This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-05
Channels
- # announcements (1)
- # beginners (72)
- # boot (4)
- # calva (35)
- # cider (8)
- # clara (13)
- # cljdoc (31)
- # cljs-dev (34)
- # clojure (64)
- # clojure-europe (1)
- # clojure-finland (3)
- # clojure-italy (23)
- # clojure-losangeles (3)
- # clojure-nl (35)
- # clojure-uk (19)
- # clojurescript (26)
- # cursive (19)
- # datomic (12)
- # duct (5)
- # editors (7)
- # emacs (25)
- # fulcro (40)
- # funcool (5)
- # jobs (2)
- # leiningen (3)
- # luminus (2)
- # lumo (3)
- # off-topic (19)
- # pathom (3)
- # planck (2)
- # reagent (6)
- # remote-jobs (4)
- # rum (1)
- # shadow-cljs (23)
- # spacemacs (6)
- # tools-deps (12)
Morning, working out the multi tenancy plans for my current project, hoping to make a valid case to go to a streaming platform. And a bug of course.
Cool @borkdude, I just brew
ed it. Question: on one of my three source files, it gives an error:
$ clj-kondo --lang cljs --lint ./src/main/myapp.cljs
./src/main/myapp.cljs:0:0: error: Can't read ./src/main/myapp.cljs, no conversion to symbol
Any idea what’s wrong? (source here: https://github.com/svdo/CLJSReactNativeNavigation/blob/4277eea5d5ce365cfad39be46c9feda821c7bd79/src/main/myapp.cljs)@stefan.van.den.oord Thanks, I’ll look into it
@stefan.van.den.oord It chokes on the string namespaces. I’ll fix it and let you know
@stefan.van.den.oord Are you on linux or Mac?
The binary for mac with the fix in it is downloadable here: https://887-176829714-gh.circle-artifacts.com/0/release/clj-kondo-2019.04.04-alpha2-SNAPSHOT-macos-amd64.tar.gz Can you test it?
I just did and it works as intended. Thanks for teaching me about the inline-def debugging technique by the way! 🎉
cool. did you scan the entire classpath? that way you’ll also detect invalid arities to library calls from your own source
It's so fast I can even run it on my entire workspace folder some nice/weird things like
../advent-of-cljc/src/aoc/y2018/d07/mfikes.cljc:45:9: warning: obsolete let
../advent-of-cljc/src/aoc/y2018/d08/borkdude.cljc:11:3: warning: obsolete do
../open-bank/target/cljsbuild-compiler-1/cljs_http/client.cljs:369:16: error: Wrong number of args (1) passed to cljs.core/get
../open-bank/target/cljsbuild-compiler-1/reagent/ratom.cljs:91:3: error: Call to private function pr-writer
../pokequiz/resources/public/js/compiled/out/cljs_http/client.cljs:359:35: error: Wrong number of args (1) passed to cljs.core/get
../pokequiz/resources/public/js/compiled/out/re_frisk/core.cljs:103:21: error: Wrong number of args (0) passed to re-frisk.core/unmount-view
that error about cljs_http seems correct, since the author didn’t require get here: https://github.com/r0man/cljs-http/blob/master/src/cljs_http/client.cljs#L354
clj-kondo lints comment sections by design, since I want to keep examples up to date.
but you can turn it off by providing the flag --ignore-comments
. That’s not yet documented since I’m not sure what the best way is to accomodate future options yet. So it might change…
The reagent error is a false positive, since the linter thinks it’s calling https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L10176
I think it’s a bug in CLJS itself that it doesn’t warn about private usage from cljs.core. E.g.:
$ clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "RELEASE"}}}' -m cljs.main -re node
Downloading: org/clojure/clojurescript/maven-metadata.xml from
ClojureScript 1.10.520
cljs.user=> (maybe-warn 1)
1
nil
The function maybe-warn
is private in cljs.core.