Closed marksto closed 3 months ago
Hi Peter!
Adding yet another hook for clj-kondo here.
clj-kondo
Having, for instance:
(encore/defonce v-thread-executor "..." {:private true :tag 'java.util.concurrent.ExecutorService} (knit/executor :virtual {:thread-factory v-thread-factory}))
produces the following clj-kondo --lint result:
clj-kondo --lint
error: Unresolved symbol: v-thread-executor
Which is not cool, right?
A new hook translates the defonce example above into:
defonce
(clojure.core/defonce v-thread-executor (knit/executor :virtual {:thread-factory v-thread-factory}))
with all the metadata
{:private true, :tag (quote java.util.concurrent.ExecutorService), :doc "..."}
being appropriately set to the v-thread-executor token node.
v-thread-executor
This eliminates the aforementioned error.
Cheers, Mark
@marksto Thank you Mark! Merged manually, will be included in the next Encore release 👍
Hi Peter!
Adding yet another hook for
clj-kondo
here.Before
Having, for instance:
produces the following
clj-kondo --lint
result:Which is not cool, right?
After
A new hook translates the
defonce
example above into:with all the metadata
being appropriately set to the
v-thread-executor
token node.This eliminates the aforementioned error.
Cheers, Mark