I have a strange error (because I can't find any references to this) on having a spec from another namespace that is only required and used in a (comment ...) block causing a compile failure. Is that a special case similar to unknown reader tags in the comment block that will cause it to fail since it attempts to parse that anyway?
You mean this reader error:
> clj
Clojure 1.11.1
user=> (comment
(require '[foo.bar :as quux])
::quux/wibble
Syntax error reading source at (REPL:4:0).
Invalid token: ::quux/wibble
user=>That's because the contents of the comment must be syntactically valid Clojure tokens, and because the require is runtime and not evaluated, the auto-resolving keyword prefix ::quux cannot be expanded.
You could either add the require to your ns (even tho' it wouldn't be used elsewhere -- you could use :as-alias instead of :as if you don't want it to be actually loaded assuming you're on a recent enough version of Clojure) or you could use the fully-qualified Spec name instead of using the alias.
Thanks Sean, makes sense, I added a partner dev who cleaned up that namespace since it wasn’t used (coming from a typed language and the non use of that ns bugged him).