Fork me on GitHub
Yehonathan Sharvit06:04:00

Sometimes, I need to require a namespace for its side-effects (e.g. defmethod declarations). clj-kondo seems to understand that when I write

(ns foo
  (:require bar))
But cider-refactor removes bar from the require list, as it “Remove any unused libspec vectors”. Does anyone know a way to tell clj-refactor to keep bar?


Don’t know, maybe ask in CIDER? Perhaps it can use the same convention as clj-kondo?

Yehonathan Sharvit07:04:19

How did you solve it in clj-kondo?


Libraries without an alias or :refer are considered to be required for side effects and left alone


Is there any difference — to the tooling — between (:require bar) and (:require [bar])? I think some tools treat the latter as a special case but not the former?


to clj-kondo there is no difference I believe