Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.namespace by

If you try to declare an empty namespace with (ns), you get an ArityException, but ns-decl? does not test for this.

The attached patch simply tests whether it is at least two items long.

I have previously signed the Clojure CA.

3 Answers

0 votes
by

Comment made by: techpractical

I'm wondering if it's worth updating my patch to also check that the namespace name is a symbol.

0 votes
by

Comment made by: stuart.sierra

I feel like I need some more context here. What is the motivation for making a change in this case? Have you encountered real code in which {{(ns)}} causes a problem because tools.namespace accepts it as a valid namespace declaration?

0 votes
by
Reference: https://clojure.atlassian.net/browse/TNS-43 (reported by techpractical)
...