<< Back to previous view

[TNS-30] Required namespace outside of list is ignored Created: 08/Dec/14  Updated: 12/Dec/14  Resolved: 12/Dec/14

Status: Closed
Project: tools.namespace
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: Petr Gladkikh Assignee: Stuart Sierra
Resolution: Not Reproducible Votes: 0
Labels: None


 Description   

I have ns declaration in form

(ns current.namespace
   (require [second.namespace]
            third.namespace))

If I change file of third.namespace or one of dependencies's files then all affected namespaces are reloaded except current.namespace.
If I change declaration to one below then reloading works as expected and current.namespace is reloaded if I make change in same file as above.

(ns current.namespace
   (require [second.namespace]
            [third.namespace])) ; "third.namespace" is now in vector

It looks like that ns parser in tools.namespace is incorrect.
Documentation for clojure.core/require says: A libspec is a lib name or a vector containing a lib name followed by options expressed as sequential keywords and arguments.

I think that plain namespace name in require clause should be supported by tools.namespace.

Used version 0.2.7 of tools.namespace



 Comments   
Comment by Petr Gladkikh [ 08/Dec/14 12:33 PM ]

I tried to play more with the reloading and it turns out that the issue is not the syntax of require but the fact that I made changes to the file.
The issue is that REPL namespace is not refreshed by clojure.tools.namespace.repl/refresh even if it has file appropriately named for it's namespace and placed among other clj source files. (Explicit modification of 'current.namespace' file or re-evaluation helps, however).

Seems that I can not modify or delete the issue after creation. Probably it should be deleted until I diagnose the problem better.

Comment by Stuart Sierra [ 12/Dec/14 1:18 PM ]

Cannot reproduce.





Generated at Wed Dec 17 18:51:22 CST 2014 using JIRA 4.4#649-r158309.