Closed AlexBaranosky closed 11 years ago
This is for :refer
rather than :as
, right?
yes, for :refer
. It sees both as being present in the original ns, so it then choose by alphabetical sort (I think). 99% of the time you want clojure.string/join. I've actually yet to use clojure.set/join
...
We should probably get it to prefer :as
candidates when the last segment of the ns matches the alias used, but that doesn't help for :refer
.
I don't think it's feasible to get in the business of maintaining a preferences list just because the scope of such a thing would potentially be almost limitless.
We could possibly search for user-specified preference rules, but the implementation of that could get hairy. Maybe if it were just read-string on a dotfile? Even then supporting project-level rules vs user-wide ones could be tricky.
This code seems to work: https://github.com/technomancy/slamhound/pull/24
Fixed by #24
If a namespace uses clojure.string/join, but also includes clojure.set, it seems to always choose set/join over string/join.