Uploaded image for project: 'tools.namespace'
  1. TNS-35

Read/analyze ClojureScript and conditional read sources


    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Completed
    • Labels:


      Clojure 1.7 and ClojureScript 3308 introduced support for the Conditional Reader.

      tools.namespace started out as a Clojure-only library. Support for the conditional reader was added in TNS-34 Closed , but it was hard-coded for Clojure (.clj and .cljc) files only.

      Some high-level features of tools.namespace, such as code reloading via c.t.n.repl/refresh, are coupled to the Clojure(JVM) implementation, and could not easily be ported to ClojureScript. I regard that as a non-issue for now, since other tools (e.g. Figwheel) exist to do reloading in ClojureScript.

      However, other features of tools.namespace, such as namespace dependency analysis, do not depend specifically on Clojure(JVM). It might be useful to apply those tools on ClojureScript source files.

      The deeper problem is the multi-layered structure of tools.namespace. The Clojure/ClojureScript distinction only really matters in the "lower" layers such as c.t.n.file and c.t.n.parse, but the layered structure makes it awkward to pass options through from the "higher" layers such as c.t.n.dir and c.t.n.find.

      See also comments on TNS-29 Closed .

      This ticket is a place to capture work and notes about this problem.




            • Assignee:
              stuart.sierra Stuart Sierra
              stuart.sierra Stuart Sierra
            • Votes:
              1 Vote for this issue
              3 Start watching this issue


              • Created: