Uploaded image for project: 'Clojure'
  1. CLJ-1582

Overriding in-ns and ns is problematic

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: None
    • Fix versions: None
    • Labels:
      None
    • Patch:
      Code

      Description

      Currently it is possible to override clojure.core/in-ns and clojure.core/ns, but it is not possible to refer to the namespace-specific vars without fully qualifying them:

      user=> (ns foo (:refer-clojure :exclude [in-ns]))
      nil
      foo=> (def in-ns 1)
      #'foo/in-ns
      foo=> in-ns
      #<clojure.lang.RT$1@76b5e4c5>
      

      After this patch, overriding in-ns and ns works like for every other clojure.core var:

      user=> (ns foo (:refer-clojure :exclude [in-ns]))
      nil
      foo=> (def in-ns 1)
      #'foo/in-ns
      foo=> in-ns
      1
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bronsa Nicola Mometto
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: