c.t.n.p/deps-from-ns-decl does not like (:use [some-root-ns module1 module2])

Description

I am experiencing issues using the c.t.n.r/refresh on my project.

I believe that I have tracked down the issue to the way deps-from-ns-decl parses :use; that is: it is different from Clojure's.

I have several places used ns-forms of the shape:

Where Clojure would load some-root-ns.module2 and some-root-ns.module3.

However, this is what deps-from-ms-decl gets:

Note that while it is of course easily fixed by using this ns-form:

It would probably be desirable to be equivalent with Clojure's behavior.

Environment

Clojure 1.5.1 ; Clojure.tools.namespace 0.2.3

Activity

Show:
Stuart Sierra
July 2, 2013, 1:44 PM

c.t.namespace.parse does not currently support all the varied argument forms that Clojure's use and require will accept.

In general, c.t.namespace.parse adheres to the docstrings of the use and require functions, which state that prefixed namespaces are written as a list, not a vector. The use and require functions do not enforce this, leading to widespread variation in usage.

This is a duplicate of TNS-9.

Until it is resolved, you can write your prefixed namespaces as a list, like:

In general, I recommend against using prefix lists in ns declarations because they are harder to identify using text-based search tools.

Stuart Sierra
January 10, 2014, 5:26 PM

Mark old resolved issues as 'closed'

Duplicate

Assignee

Stuart Sierra

Reporter

import

Labels

None

Approval

None

Patch

None

Priority

Minor