Fork me on GitHub
Joshua Suskalo22:07:59

@borkdude looks like the unused import linter currently doesn't understand usages of the class in the :gen-class ns clause


can you post an example?

Joshua Suskalo22:07:51

(ns <redacted>
   (com.mongodb.kafka.connect.sink MongoSinkTopicConfig)
   (com.mongodb.kafka.connect.sink.processor PostProcessor))
   :name "<redacted>"
   :extends PostProcessor
   :constructors {[MongoSinkTopicConfig] [MongoSinkTopicConfig]}))

Joshua Suskalo22:07:21

This is what I'm currently working on where I spotted it


ok, so you're importing it to use it within gen class?


issue welcome


if you can, make a repro with a standard JDK class which I can run locally

Joshua Suskalo19:07:12

Okay, turns out this should be an error.

Joshua Suskalo19:07:33

Because apparently the classes in your import clause aren't available in the gen-class form

Joshua Suskalo19:07:37

so you need to fully-qualify them.


I guess it matters in which order you put those clauses

Joshua Suskalo19:07:01

Nope, I have the order in a way that should make sense, but it still resolves non-qualified class names as being from java.lang