This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-26
Channels
- # announcements (10)
- # aws (5)
- # babashka (27)
- # beginners (175)
- # boot (1)
- # braveandtrue (2)
- # calva (11)
- # cider (13)
- # clj-kondo (91)
- # cljs-dev (54)
- # cljsrn (20)
- # clojure (164)
- # clojure-gamedev (3)
- # clojure-uk (43)
- # clojurescript (185)
- # core-async (6)
- # core-typed (1)
- # cursive (1)
- # docker (2)
- # emacs (2)
- # figwheel-main (78)
- # fulcro (69)
- # off-topic (20)
- # pathom (30)
- # planck (3)
- # re-frame (6)
- # reagent (70)
- # reitit (26)
- # ring (1)
- # shadow-cljs (120)
- # tools-deps (6)
- # vim (9)
Podcast about clj-kondo and other topics: https://www.therepl.net/
What does this line #!/usr/bin/env clojure -Sdeps {:deps,{selmer,{:mvn/version,"1.12.17"},clj-kondo,{:mvn/version,"2020.04.05"}}}
do? From clj-kondo.lsp/script/update-project.clj.
I get a warning /usr/bin/env: 'clojure -Sdeps {:deps,{selmer,{:mvn/version,"1.12.17"},clj-kondo,{:mvn/version,"2020.04.05"}}}': No such file or directory
because I don't think that's a valid shebang line.
@hindol.adhya That might be a difference between macOS and linux. on macOS a shebang can take arguments. But this is easily fixable.
@hindol.adhya Like this:
#!/bin/sh
#_(
"exec" "bb" "$0" hello "$@"
)
Sure. A PR's coming your way. I thought creating a deps.edn in the same directory would fix it as well, but that didn't work.
At first glance, using clojure that way, it's downloading the deps but not building the classpath right.
Could not locate selmer/parser__init.class, selmer/parser.clj or selmer/parser.cljc on classpath.
@borkdude How about just sed "s/{{version}}/$(cat vscode-extension/CLJ_KONDO_VERSION)/g" server/project.clj.template > server/project.clj
? Should work on MacOS as well.
@hindol.adhya I pushed the fix for linux
Still does not work on my system.
Syntax error (FileNotFoundException) compiling at (script/update-project.clj:1:1).
Could not locate selmer/parser__init.class, selmer/parser.clj or selmer/parser.cljc on classpath.
And no server/project.clj is created (I deleted the on from git).@hindol.adhya How do you start the script?
@hindol.adhya This works for me on Debian with commit 7f15c58512dd347cf9e537120a942d8aaf9e2861
:
borkdude@vps1918:/tmp/clj-kondo.lsp$ script/build-server
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1~deb9u1-b01)
OpenJDK 64-Bit Server VM (build 25.212-b01, mixed mode)
Generation version file: 2020.04.05 > ../vscode-extension/CLJ_KONDO_VERSION
Compiling clj-kondo.lsp-server.impl.server
Compiling clj-kondo.lsp-server.impl.version
Compiling clj-kondo.lsp-server.main
Created /tmp/clj-kondo.lsp/server/target/lsp-server-2020.04.05.jar
Created /tmp/clj-kondo.lsp/server/target/lsp-server-2020.04.05-standalone.jar
I am on Ubuntu Focal under Windows WSL, but the WSL part should not matter. It works just like plain Linux.
I tested it on a debian machine where I never ran this repo before and it worked the first time. I'm not sure why it doesn't work for you. Can you try deleting + cloning from scratch?
hi hi - i’m using and loving clj-kondo 🙂 i’m trying to disable the :unused-namespace
linter from within a namespace without success, i’ve added {:clj-kondo/config ^:replace {:linters {:unused-namespace {:exclude ["."]}}}}
as metadata. I’ve also tried {:clj-kondo/config ^:replace {:linters {:unused-namespace {:level :off}}}}
. any idea of what would help?
Hi @nonrecursive - thanks and welcome.
@nonrecursive Can you post a repro of an entire (small) file, so we can talk about exactly the same code?
sure thing, thank you very much!
looks like i’m on v2019.12.14
also note that only namespaces required with an alias or refer are reported. so (:require [foo.specs])
is fine
looks like that did it!! so easy. thank you!
ah, nice
what i’m actually doing is creating a dev
namespace with a lot of aliased namespaces pulled in to put them within easy reach
Hi! I like clj-kondo but I am having problems getting it to work with Cursive 2020.1 I followed the instructions but it still doesn't pop up the lint info when I hover. Any suggestions?
BTW, this is an awesome tool! I work with Datomic Cloud and this will cut down on the number of deploys to get error messages.
@hadilsabbagh18 Cool. Did you also see the datalog linting? About Cursive: hmm, I don't know, how are you using it, via the filewatchers or LSP? Did you try turning it off and on again (seriously.. ;))?
Worth a try, but still I think it should work. Maybe @timothypratley knows something
Hi @timothypratley! I have problems using clj-kondo with Intellij Cursive 2020.1 with File Watchers. I have followed all the directions and nothing pops up when I hover over bad code. Any suggestions?
Yes. I compared the screen on Github to the one on my IDE and they match. I did all the prep work with .clj-kondo in my directory and linting the classpath.
MacOS. I just restarted and put the absolute path of clj-kondo in the setup. Let me see if that works...
Maybe it's an issue with the FileWatchers plugin. Can you maybe test it with something else they claim that should work?
Sorry, I misunderstood the LSP instructions. They work now. I have clj-kondo working properly on my Intellij. No changes to docs are necessary. Thanks for your help!
it's a pity that the Filewatcher is not working anymore, but gladly there is another option
Hi @hadilsabbagh18 I am glad you got got it working with LSP 🙂 Just FYI all I know is that 2020.1 no longer supports the FileWatchers plugin. I don’t know why and I hope if we just wait a bit longer that will be resolved. But there is not really much difference between LSP and FileWatchers, so you are probably best off just sticking with LSP 🙂
Thanks for the feedback @timothypratley. LSP is working fine for me now.
@borkdude ah I’m a little confused to be honest 🙂 When I upgraded IntelliJ it said FileWatchers was unsupported, but now I just opened up and enabled them and they are working fine
so FWIW the FileWatchers way works for me still on 2020.1
@timothypratley I just set up filewatchers in 2019.2 but it doesn't work for me anymore, if I follow the directions
Can you check that they are “enabled”?
uh oh 🙂 that sounds bad…
I don't know enough about IntelliJ, I'm giving up on the FW for today, since my wife needs me now 😉
:thumbsup: I think tomorrow I can try out a fresh VM and experiment, no ideas right now either sorry.
honestly the filewatchers thing feels like a bit of a hack compared to using the lsp plugin anyway