taoensso / telemere

Structured telemetry library for Clojure/Script
https://www.taoensso.com/telemere
Eclipse Public License 1.0
199 stars 5 forks source link

Fix clj-kondo warnings #32

Open ptaoussanis opened 1 month ago

ptaoussanis commented 1 month ago

Currently, it looks like clj-kondo generates spurious warnings for Telemere (Ref. Slack):

image_480

I'm not familiar with with clj-kondo, but as I understand it - Telemere could help get rid of these warnings by including some sort of relevant data file.

This'd be a good first PR if someone familiar with clj-kondo wants to help out. Feel free to ping if I can provide any assistance re: relevant signatures / arg types / etc.

In the meantime, my understanding is that the following config will suppress the spurious warnings (Ref. Slack):

{:linters
 {:unresolved-var
  {:exclude [taoensso.telemere/*ctx*
             taoensso.telemere/add-handler!
             taoensso.telemere/handler:console
             taoensso.telemere/handler:file
             taoensso.telemere/pr-signal-fn
             taoensso.telemere/set-ctx!
             taoensso.telemere/set-middleware!
             taoensso.telemere/stop-handlers!]}}}
ptaoussanis commented 1 month ago

Update: @rschmukler mentioned that running rm -rf .clj-kondo/.cache in the root of your project directory might remove the spurious warnings.

ptaoussanis commented 4 weeks ago

Seems clearing the cache as mentioned above is indeed successful, so closing this issue.

icp1994 commented 4 weeks ago

I did try that before searching here, but didn't work for me image

ptaoussanis commented 4 weeks ago

@icp1994 To confirm, you tried to first run rm -rf .clj-kondo/.cache in the root of your project directory? Might restarting your IDE help?

icp1994 commented 4 weeks ago

Yes. I also started a fresh dummy project to make sure.

ptaoussanis commented 4 weeks ago

I'm not familiar with clj-kondo myself so unfortunately can't advise - but hopefully someone else might be able to.

@rschmukler Is there anything else you can suggest for @icp1994 to try? Thanks! 🙏 (Tagging you because of your comment on the Telemere Slack).

icp1994 commented 4 weeks ago

I think there needs to be separate config which users can import, like there is for nippy.

ptaoussanis commented 4 weeks ago

I think there needs to be separate config which users can import, like there is for nippy.

I'm hoping that might not be the case, since it seems there's at least two clj-kondo users here that have reported success after clearing their cache. Not sure though! Hopefully someone else familiar with clj-kondo can advise?