Recently, I found a bug in a project from the company I work at.
Basically, what was happening was that inside a test's namespace we required two different namespaces, let's call them first-ns and second-ns here.
Both first-ns and second-ns had the definition of a spec with the same name, like this:
(ns first-ns)
(s/def :same/name
int?)
(ns second-ns)
(s/def :same/name
string?)
So my question is, is there a way to make the Clojure compiler complain about a name clash for cases like this? In large codebases with hundreds of specs, this can occasionally happen and cause a heisenbug. Is the only solution to make the specs namespaced to the same ns of the file in which they were defined?