Commits on Apr 25, 2017
Commits on Jan 5, 2016
  1. TNS-40 Catch reader exceptions at higher level

    Don't catch exceptions in c.t.n.file (changed behavior).
    Catch only Exceptions with ex-data :reader-exception (thrown by
    tools.reader) in c.t.n.find.
    Consequences: Exceptions caused by syntax errors will be ignored when
    searching for name spaces. Other exceptions will throw: I/O problems or
    the wrong version of tools.reader on the classpath.
    stuartsierra committed Jan 5, 2016
  2. Add c.t.n.find-test

    Tests 'platform' argument to find/find-sources-in-dir
    stuartsierra committed Jan 5, 2016
  3. Add test-helpers

    To replace some private helper functions in c.t.n.move-test
    stuartsierra committed Jan 5, 2016
Commits on Nov 29, 2015
  1. Do not parse require-macros/use-macros

    tools.namespace cannot correctly represent all the possible permutations
    of mixed-language projects. For example, a ClojureScript file may
    contain an ns declaration with :require-macros pointing to a Clojure
    file of the same namespace. If tools.namespace were to treat
    :require-macros the same as :require, that would cause an error as a
    circular dependency. See TNS-38.
    The previous attempt at a solution, commit 6b19f94, attempted to work
    around the problem, but that just masks the underlying issue. See
    reversion at commit 149f465.
    Although tools.namespace supports .cljc and .cljs files since
    0.3.0-alpha1, it does so by restricting its purview to one platform at a
    time. Since :require-macros/:use-macros cross the platform boundary,
    from Clojure to ClojureScript, they don't fit into the current model.
    stuartsierra committed Nov 29, 2015
Commits on Nov 28, 2015
  1. Revert "TNS-38: ignore dependency on self"

    This reverts commit 6b19f94.
    The commit being reverted here doesn't really solve the problem, just
    masks it.
    :require-macros is a special case; it crosses the boundary between two
    "platforms," Clojure and ClojureScript. As such, it breaks many of the
    assumptions on which the current design of tools.namespace is based, in
    particular the assumption that there is a one-to-one correspondance
    between files and namespaces.
    Until some future design in which tools.namespace can understand the
    structure of mixed-language projects, I think it makes more sense to
    keep each "platform" completely separate, by ignoring
    :require-macros (and :use-macros) altogether.
    stuartsierra committed Nov 28, 2015
Commits on Nov 13, 2015
Commits on Nov 6, 2015
  1. TNS-38: ignore dependency on self, for CLJS

    In Clojure (.clj) code, a namespace depending on itself makes no sense.
    But it is perfectly reasonable for a ClojureScript (.cljs) file to
    depend on a Clojure (.clj) file for macro definitions in the same
    namespace, via :require-macros.
    More generally, this means that a "namespace" is logically defined in
    multiple files, which tools.namespace does not yet handle.
    This causes spurious circular-dependency error in tools. See, for
    example, clojure-emacs/refactor-nrepl#127
    It is easy to work around the specific case of self-dependency via
    :require-macros, which has no meaning anywhere else.
    As a consequence, tools.namespace will no longer throw an exception if
    an ordinary Clojure namespace tries to :require itself.
    stuartsierra committed Nov 6, 2015
Commits on Aug 14, 2015
  1. README: fix link formatting

    stuartsierra committed Aug 14, 2015
Commits on Aug 7, 2015
  1. c.t.n.dependency: replace Exception with ex-info

    For ClojureScript compatibility
    stuartsierra committed Aug 7, 2015
  2. Set 0.3.0-SNAPSHOT as current version in README

    To build SNAPSHOT versions on Hudson and deploy to Sonatype for testing.
    stuartsierra committed Aug 7, 2015
Commits on Aug 2, 2015
Commits on Jul 31, 2015
  1. c.t.n.repl: make repl state public

    'refresh-tracker' and 'refresh-dirs' may be useful for for inspection at
    the REPL.
    stuartsierra committed Jul 31, 2015
  2. TNS-35: Platform-selection args for dir,file,find

        * Add definitions for standard file extensions for Clojure and
        * Add 'clojurescript-file?'
        * Add "platform" definitions 'clj' and 'cljs' to encapsulate reader
          options and file extensions.
        * Add optional "platform" argument to most functions.
        * Rename functions with "clojure" in their name to be more generic,
          deprecate old names.
        * Deprecate 'scan' and 'scan-all', replace with new functions
          'scan-dirs' and 'scan-files' taking "platform" argument.
        * Use new 'scan-dirs' function in c.t.n.dir
    stuartsierra committed Jul 31, 2015
  3. TNS-35: Port dependency, parse, track to .cljc

    Add dependency on Clojure 1.7.0.
    Add dependency on tools.reader for conditional read with :cljs features.
    stuartsierra committed Jul 31, 2015
  4. TNS-36: Use java.classpath

    Past versions of tools.namespace copied some functions from
    org.clojure/java.classpath to avoid a dependency.
    Since the addition of CLASSPATH-5, tools.namespace has been missing some
    functionality necessary to fully resolve the classpath in some
    This patch replaces the duplicated functions with a dependency on
    stuartsierra committed Jul 26, 2015
Commits on Jul 26, 2015
  1. c.t.namespace: give new location of deprecated fn

    In docstring for deprecated
    stuartsierra committed Jul 26, 2015
Commits on Jul 17, 2015
Commits on Jun 19, 2015
  1. Update README with TNS-34

    stuartsierra committed Jun 19, 2015