Fork me on GitHub
#clj-kondo
<
2020-08-13
>
maxp05:08:45

In that script

#!/usr/bin/env bb
;; (require '[babashka.classpath])
(babashka.classpath/add-classpath ".")
clj-kondo shows deprecation warning for clojure.core/add-classpath is that correct?

maxp05:08:10

there is no such warning when I uncomment require line.

borkdude05:08:08

Probably a bug. Can you make an issue?

maxp08:08:14

hmm... or may be it is Calva's mistake

maxp08:08:59

how clj-kondo intended to work with babashka scripts?

maxp08:08:16

Yes. that was when I connect to Clojure repl but open babashka script in editor.

maxp08:08:09

That was a little bit confusing when clj-kond tells about clojure.core/add-classpath underlining babashka.classpath/add-classpath

maxp08:08:09

But what about ,cljb extensions? 🙂 it is the time to introduce!

dominicm08:08:50

Kondo should know those two things aren't the same :) regardless of file extension for bb or not.

dominicm08:08:38

Does the error happen when running kondo from the cli?

borkdude08:08:58

@maxp I can't reproduce with the above:

$ clj-kondo --lint /tmp/foo.clj
/tmp/foo.clj:4:2: warning: Unresolved namespace babashka.classpath. Are you missing a require?
linting took 10ms, errors: 0, warnings: 1

borkdude08:08:26

Of course if you only write add-classpath unqualified, clj-kondo is going to think it's from clojure.core and then it's indeed deprecated