/usr/share/doc/libtools-namespace-clojure/html/README.html is in libtools-namespace-clojure 0.2.11-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>clojure.tools.namespace</title>
</head>
<body>
<h1>clojure.tools.namespace</h1>
<p>Tools for managing namespaces in Clojure. Parse <code>ns</code> declarations from
source files, extract their dependencies, build a graph of namespace
dependencies within a project, update that graph as files change, and
reload files in the correct order.</p>
<p>This is only about namespace dependencies <strong>within</strong> a single project.
It has nothing to do with Leiningen, Maven, JAR files, or
repositories.</p>
<h2>Releases and Dependency Information</h2>
<ul>
<li><p><a href="https://github.com/clojure/tools.namespace/tree/tools.namespace-0.2.11">Latest stable release is 0.2.11</a></p></li>
<li><p><a href="http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.clojure%22%20AND%20a%3A%22tools.namespace%22">All Released Versions</a></p></li>
</ul>
<p><a href="http://leiningen.org/">Leiningen</a> dependency information:</p>
<pre><code>[org.clojure/tools.namespace "0.2.11"]
</code></pre>
<p><a href="http://maven.apache.org/">Maven</a> dependency information:</p>
<pre><code><dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.namespace</artifactId>
<version>0.2.11</version>
</dependency>
</code></pre>
<h3>Development Snapshots</h3>
<ul>
<li><p>Git master branch is at <strong>0.2.12-SNAPSHOT</strong></p></li>
<li><p><a href="https://oss.sonatype.org/content/groups/public/org/clojure/tools.namespace/">All Snapshot Versions</a></p></li>
</ul>
<p>Leiningen dependency information for development snapshots:</p>
<pre><code>:dependencies [[org.clojure/tools.namespace "0.2.12-SNAPSHOT"]]
:repositories {"sonatype-oss-public"
"https://oss.sonatype.org/content/groups/public/"}
</code></pre>
<p>See also <a href="http://dev.clojure.org/display/doc/Maven+Settings+and+Repositories">Maven Settings and Repositories</a> on dev.clojure.org.</p>
<h2>Overview</h2>
<p><a href="http://clojure.github.com/tools.namespace/">API Documentation</a></p>
<p>tools.namespace consists of several parts:</p>
<p><strong>clojure.tools.namespace.parse:</strong> A parser for namespace declarations
in Clojure source files. Given a stream of characters from a Clojure
source file, it can find the <code>ns</code> declaration and parse the <code>:require</code>
and <code>:use</code> clauses to find the names of other namespaces that file
depends on. This is all syntactic analysis: it does not
evaluate any code.</p>
<p><strong>clojure.tools.namespace.find:</strong> Utilities to search for Clojure
namespaces on the filesystem, in directories or JAR files. Combined
with <a href="http://clojure.github.com/java.classpath/">java.classpath</a>, it
can search for namespaces on the Java classpath. This namespace
contains most of the functions in clojure.tools.namespace version
0.1.x.</p>
<p><strong>clojure.tools.namespace.repl:</strong> Utilities to load and reload code
based on the namespace dependency graph. This takes some explaining,
see below. c.t.n.repl is built out of smaller parts:</p>
<ul>
<li>c.t.n.dependency - generic dependency graph data structure</li>
<li>c.t.n.track - namespace dependency tracker</li>
<li>c.t.n.file - file-reader extension to tracker</li>
<li>c.t.n.dir - directory-scanner extension to tracker</li>
<li>c.t.n.reload - namespace-reloading extension to tracker</li>
</ul>
<p>You can recombine these parts in other ways, but c.t.n.repl is the
primary public entry-point to their functionality.</p>
<p><strong>clojure.tools.namespace.move:</strong> Utilities to aid in moving and
renaming Clojure namespaces. This code is still ALPHA, and it modifies
your source files, so be careful.</p>
<h2>Reloading Code: Motivation</h2>
<p>c.t.n.repl is a smarter way to reload code. </p>
<p>The traditional way to reload Clojure code without restarting the JVM
is <code>(require ... :reload)</code> or <code>:reload-all</code> or an editor/IDE feature
that does the same thing. This has several problems:</p>
<ul>
<li><p>If you modify two namespaces which depend on each other, you must
remember to reload them in the correct order to avoid compilation
errors.</p></li>
<li><p>If you remove definitions from a source file and then reload it,
those definitions are still available in memory. If other code
depends on those definitions, it will continue to work but will
break the next time you restart the JVM.</p></li>
<li><p>If the reloaded namespace contains <code>defmulti</code>, you must also reload
all of the associated <code>defmethod</code> expressions.</p></li>
<li><p>If the reloaded namespace contains <code>defprotocol</code>, you must also
reload any records or types implementing that protocol and replace
any existing instances of those records/types with new instances.</p></li>
<li><p>If the reloaded namespace contains macros, you must also reload any
namespaces which use those macros.</p></li>
<li><p>If the running program contains functions which close over values in
the reloaded namespace, those closed-over values are not updated.
(This is common in web applications which construct the "handler
stack" as a composition of functions.)</p></li>
</ul>
<p>Often the only surefire way to reload Clojure code is to restart the
JVM. A large Clojure application can take 20 seconds or more just to
compile. I wrote tools.namespace to help speed up this development
cycle.</p>
<p>For more detail on how I use tools.namespace in my development
workflow, see the article <a href="http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded">My Clojure Workflow, Reloaded</a>.</p>
<h2>Reloading Code: Usage</h2>
<p>There's only one important function, <code>refresh</code>:</p>
<pre><code>user=> (require '[clojure.tools.namespace.repl :refer [refresh]])
nil
user=> (refresh)
:reloading (com.example.util com.example.app com.example.app-test)
:ok
</code></pre>
<p>The <code>refresh</code> function will scan all the directories on the classpath
for Clojure source files, read their <code>ns</code> declarations, build a graph
of their dependencies, and load them in dependency order. (You can
change the directories it scans with <code>set-refresh-dirs</code>.)</p>
<p>Later on, after you have changed and saved a few files in your editor,
run it again:</p>
<pre><code>user=> (refresh)
:reloading (com.example.app com.example.app-test)
:ok
</code></pre>
<p>Based on file modification timestamps and the graph of dependencies,
the <code>refresh</code> function will reload <em>only</em> the namespaces that have
changed, in dependency order. But first, it will <em>unload</em> (remove) the
namespaces that changed to clear out any old definitions.</p>
<p>This is quite unlike <code>(require ... :reload)</code>. Calling <code>refresh</code> will
<em>blow away your old code</em>. Sometimes this is helpful: it can catch
trivial mistakes like deleting a function that another piece of code
depends on. But sometimes it hurts when you have built-up application
state stored in a Var that got deleted by <code>refresh</code>.</p>
<p>This brings us to the next section:</p>
<h2>Reloading Code: Preparing Your Application</h2>
<p>Being able to safely destroy and reload namespaces without breaking
your application requires some discipline and careful design. It won't
"just work" on any Clojure project.</p>
<h3>No Global State</h3>
<p>The first rule for making your application reload-safe is <strong>no global
state</strong>. That means you should avoid things like this:</p>
<pre><code>(def state-of-world (ref {}))
(def object-handle (atom nil))
</code></pre>
<p>c.t.n.repl/refresh will destroy those Vars when it reloads the
namespace (even if you used <code>defonce</code>).</p>
<p>Instead of storing your state in global Vars, store it <em>locally</em> in an
object that represents the running state of your application. Then
provide a constructor function to initialize that state:</p>
<pre><code>(defn create-application []
{:state-of-world (ref {})
:object-handle (atom nil)})
</code></pre>
<p>You can choose what representation works best for your application:
map, vector, record, or even just a single Ref by itself.</p>
<p>Typically you'll still need one global <code>def</code> somewhere, perhaps in the
REPL itself, to hold the current application instance. See the next
section.</p>
<h3>Managed Lifecycle</h3>
<p>The second rule for making your application reload-safe is to have a
consistent way to <strong>start and stop the entire system</strong>.</p>
<p>The "start" function should:</p>
<ul>
<li><p>Acquire stateful resources such as sockets, files, and database
connections</p></li>
<li><p>Start threads or background processes</p></li>
<li><p>Initialize application state such as caches or counters</p></li>
<li><p>Return an object encapsulating the state of the application</p></li>
</ul>
<p>The "stop" function should take the state returned by "start" as an
argument and do the opposite:</p>
<ul>
<li><p>Close or release stateful resourecs</p></li>
<li><p>Stop all background processes</p></li>
<li><p>Clear out application state</p></li>
</ul>
<p>It might take a few tries to get it right, but once you have working
start and stop functions you can have a workflow like this:</p>
<p>Step 1. Start up a REPL.</p>
<p>Step 2. Load the app:</p>
<pre><code>user=> (require '[clojure.tools.namespace.repl :refer [refresh]])
user=> (refresh)
user=> (def my-app (start-my-app))
</code></pre>
<p>Step 3. Test it out.</p>
<p>Step 4. Modify some source files.</p>
<p>Step 5. Restart:</p>
<pre><code>user=> (stop-my-app my-app)
user=> (refresh)
user=> (def my-app (start-my-app))
</code></pre>
<p>(You could also combine all those steps in a single utility function,
but see warnings below.)</p>
<p>After that, you've got a squeaky-clean new instance of your app
running, in a fraction of the time it takes to restart the JVM.</p>
<h3>Handling Errors</h3>
<p>If an exception is thrown while loading a namespace, <code>refresh</code> stops,
prints the namespace that caused the exception, and returns the
exception. You can print the rest of the stacktrace with
<code>clojure.repl/pst</code>; the exception itself is bound to <code>*e</code>.</p>
<pre><code>user=> (refresh)
:reloading (com.example.app com.example.app-test)
:error-while-loading com.example.app
#<IllegalArgumentException java.lang.IllegalArgumentException:
Parameter declaration cond should be a vector>
user=> (clojure.repl/pst)
IllegalArgumentException Parameter declaration cond should be a vector
clojure.core/assert-valid-fdecl (core.clj:6567)
clojure.core/sigs (core.clj:220)
clojure.core/defn (core.clj:294)
clojure.lang.Var.invoke (Var.java:427)
...
</code></pre>
<p>Remember that any namespaces which depend on the namespace that caused
the exception <strong>do not exist</strong> at this point: they have been removed
but not yet reloaded.</p>
<p>After you fix the problem, call <code>refresh</code> again and it will resume
reloading where it left off. </p>
<p><strong>NOTE:</strong> If your current REPL namespace is one of those that has not
yet been reloaded, then none of the functions you defined in that
namespace will exist! Starting with version 0.2.8, tools.namespace
will <em>attempt</em> to restore aliases to the namespaces which were
successfully loaded.</p>
<p>So, for example, if your current REPL namespace is named <code>dev</code> and
contains this ns declaration:</p>
<pre><code>(ns dev
(:require [com.example.foo :as foo]
[com.example.bar :as bar]
[clojure.tools.namespace.repl :as tns]))
</code></pre>
<p>And you get an error on refresh like this:</p>
<pre><code>dev=> (tns/refresh)
:reloading (com.example.bar dev)
:error-while-loading com.example.bar
#<CompilerException ... compiling:(com/example/bar.clj:1:21)>
</code></pre>
<p>Then the functions in <code>com.example.foo</code> should still be available in
the <code>dev</code> namespace via the alias <code>foo</code>.</p>
<h2>Warnings and Potential Problems</h2>
<p><strong><code>ns</code> syntax:</strong> Clojure's <code>ns</code> macro is notoriously lax in what
syntax it accepts. tools.namespace.parse is somewhat liberal, but it
cannot handle every possible variation of syntax that <code>ns</code> does. Stick
to the docstrings of [ns] and [require] and everything should be fine.</p>
<p><strong>AOT-compilation:</strong> Reloading code does not work in the presence of
[AOT-compiled] namespaces. If you are using AOT-compilation in your
project, make sure it is disabled and you have deleted any
AOT-compiled <code>.class</code> files before starting a REPL development
session. (In Leiningen, run <code>lein clean</code>.)</p>
<p>Note that the presence of <code>:main</code> in project.clj triggers
AOT-compilation in some versions of Leiningen.</p>
<p><strong>Conflicts:</strong> Other libraries which also do code-reloading may
conflict with tools.namespace. One known example is ring-devel (as of
[Ring] version 1.1.6) which uses [ns-tracker], which uses an older
version of tools.namespace.</p>
<p><strong>REPL namespace:</strong> Be careful when reloading the namespace in which
you run your REPL. Because namespaces are removed when reloading, all
your past definitions are lost. Either keep your REPL in a namespace
which has no file associated with it, such as <code>user</code>, or put all your
REPL definitions in a file so that they can be reloaded.</p>
<p><strong>Fully-qualified names:</strong> Be careful when using fully-qualified
symbol names without namespace aliases (<code>require</code> with no <code>:as</code>). If
the namespace happens to be loaded already, it will not necessarily
cause an error if you forget to <code>require</code> it, but the dependency graph
of namespaces will be incorrect.</p>
<p><strong>Old definitions:</strong> Beware of code which has references to old
definitions, especially references to things you created in the REPL.</p>
<p><strong>Rolling your own:</strong> If you create your own instance of the
dependency tracker, do not store it in a namespace which gets
reloaded.</p>
<h3>Warnings for Helper Functions</h3>
<p>Be careful defining a helper function in a namespace which calls
<code>refresh</code> if that namespace also could get reloaded. For example, you
might try to combine the stop-refresh-start code from the "Managed
Lifecycle" section into a single function:</p>
<pre><code>(def my-app nil)
(defn restart []
(stop-my-app my-app)
(refresh)
(alter-var-root #'my-app (constantly (start-my-app))))
</code></pre>
<p>This won't work if the namespace containing <code>restart</code> could get
reloaded. After <code>refresh</code>, the namespace containing <code>restart</code> has been
dropped, but the function continues to run in the <em>old</em> namespace and
refer to old Vars.</p>
<p>If you want to run some code after <code>refresh</code>, you can pass an option
naming a function you want to run <em>after</em> a successful reload. The
value of this option must be a symbol, and it must be fully
namespace-qualified. The previous example could be correctly written
(assuming these functions are defined in the <code>dev</code> namespace):</p>
<pre><code>(def my-app nil)
(defn start []
(alter-var-root #'my-app (constantly (start-my-app))))
(defn restart []
(stop-my-app my-app)
(refresh :after 'dev/start))
</code></pre>
<h3>Warnings for Aliases</h3>
<p>Namespace aliases created at the REPL will still refer to the <em>old</em> namespace after <code>refresh</code>. For example:</p>
<pre><code>user=> (require '[com.example.foo :as foo])
user=> foo/bar
user=> (refresh)
:reloading (com.example.foo)
:ok
user=> foo/bar ; this is the *old* foo/bar
</code></pre>
<p>If you try to recreate the alias with the new namespace, you will get an error:</p>
<pre><code>user=> (require '[com.example.foo :as foo])
IllegalStateException Alias foo already exists in
namespace user, aliasing com.example.foo
clojure.lang.Namespace.addAlias (Namespace.java:224)
</code></pre>
<p>The only way out is to remove the alias before recreating it:</p>
<pre><code>user=> (ns-unalias *ns* 'foo)
nil
user=> (alias 'foo 'com.example.foo)
</code></pre>
<h3>Warnings for Protocols</h3>
<p>When reloading namespaces which contain protocols, be careful that you
do not leave any old instances of records or types implementing those
protocols.</p>
<p>For example, if you have a namespace like this:</p>
<pre><code>(ns com.example.foo)
(defprotocol IFoo
(foo [this]))
(defrecord FooRecord []
IFoo (foo [this] nil))
</code></pre>
<p>And you do something like the following at the REPL:</p>
<pre><code>user=> (def my-foo (->FooRecord))
user=> (clojure.tools.namespace.repl/refresh)
user=> (foo my-foo)
</code></pre>
<p>You will get a confusing error message like this:</p>
<pre><code>IllegalArgumentException
No implementation of method: :foo
of protocol: #'com.example.foo/IFoo
found for class: com.example.foo.FooRecord
clojure.core/-cache-protocol-fn (core_deftype.clj:527)
</code></pre>
<p>That's because <code>my-foo</code> is an <strong>instance</strong> of the <strong>old</strong> version of
<code>FooRecord</code>, implementing the <strong>old</strong> version of <code>IFoo</code>. As far as the
JVM is concerned, the old <code>IFoo</code> and the new <code>IFoo</code> are completely
different classes.</p>
<p>To avoid this problem, always create new instances of records after a
refresh.</p>
<h3>Warnings for Multimethods</h3>
<p>Calling <code>prefer-method</code> is a global side-effect. If you modify a call
to <code>prefer-method</code> and reload the namespace containing it, Clojure may
throw "java.lang.IllegalStateException: Preference conflict in multimethod."
The workaround is to call <code>remove-method</code> before reloading.
tools.namespace cannot detect this situation automatically. See [TNS-23].</p>
<h3>Heap Usage and PermGen (JDK 1.7 and before)</h3>
<p>In rare cases, reloading a lot of code may lead to out-of-memory
errors from the JVM like <code>java.lang.OutOfMemoryError: PermGen space</code>.</p>
<p>You may be able to mitigate this by increasing the size of the
"Permanent Generation" where the JVM stores compiled classes. To do
this, add the following command-line argument to your JVM startup:</p>
<pre><code>-XX:MaxPermSize=<N>
</code></pre>
<p>where <code><N></code> is a number with a suffix like <code>m</code> for megabytes.</p>
<p>To find the default MaxPermSize for your JDK, run
<code>java -XX:+PrintFlagsFinal</code> and search the results for "MaxPermSize".
Try doubling it.</p>
<p>The Permanent Generation was removed in JDK 1.8 ([JEP 122]) so this
section no longer applies.</p>
<p>In some older JDKs (1.5) the default garbage collector did not collect
the Permanent Generation at all unless it was explicitly enabled with
<code>-XX:+CMSPermGenSweepingEnabled</code>.</p>
<h2>Disabling Refresh In a Namespace</h2>
<p>Some projects have a "project REPL" or a "scratch" namespace where you
want keep state during development. You can use the functions
<code>disable-unload!</code> and <code>disable-reload!</code> in
<code>clojure.tools.namespace.repl</code> to prevent <code>refresh</code> from automatically
un/reloading those namespaces.</p>
<p>Use this feature sparingly: it exists as a development-time
convenience, not a work-around for code that is not reload-safe. Also,
see the warnings about aliases, below. Aliases to reloaded namespaces
will break if the namespace <em>containing</em> the alias is not reloaded
also.</p>
<p>After an error, <code>refresh</code> will <strong>not</strong> attempt to recover symbol
mappings and aliases for namespaces with <code>disable-unload!</code> or
<code>disable-reload!</code> set.</p>
<h2>Developer Information</h2>
<ul>
<li><p><a href="https://github.com/clojure/tools.namespace">GitHub project</a></p></li>
<li><p><a href="http://dev.clojure.org/display/community/Contributing">How to contribute</a></p></li>
<li><p><a href="http://dev.clojure.org/jira/browse/TNS">Bug Tracker</a></p></li>
<li><p><a href="http://build.clojure.org/job/tools.namespace/">Continuous Integration</a></p></li>
<li><p><a href="http://build.clojure.org/job/tools.namespace-test-matrix/">Compatibility Test Matrix</a></p></li>
</ul>
<h2>Change Log</h2>
<h3>Version 0.2.12-SNAPSHOT</h3>
<ul>
<li>In development, current Git master branch</li>
</ul>
<h3>Version 0.2.11 on 19-Jun-2015</h3>
<ul>
<li>[TNS-34] Allow reader conditionals in parsed source files</li>
</ul>
<h3>Version 0.2.10 on 26-Feb-2015</h3>
<ul>
<li>Widen existing functions to handle both clj and cljc files in
advance of reader conditional support in Clojure 1.7.</li>
</ul>
<h3>Version 0.2.9 on 31-Jan-2015</h3>
<ul>
<li><p>Fix [TNS-20]: Undefined 'unload' order after namespaces are first
added to an new, empty tracker.</p></li>
<li><p>Improvement [TNS-21]: Support <code>ns</code> clauses which use vectors
instead of lists for clauses, contrary to docs.</p></li>
<li><p>Improvement [TNS-32]: Support <code>ns</code> clauses which use symbols as
clause heads instead of keywords, contrary to docs.</p></li>
</ul>
<h3>Version 0.2.8 on 19-Dec-2014</h3>
<ul>
<li><p>Improvement [TNS-31]: Specific error message when <code>:after</code> symbol
passed to <code>refresh</code> cannot be resolved.</p></li>
<li><p>Fix [TNS-26]: namespace alias recovery after failed reload did not
work due to local binding shadowing global Var</p></li>
</ul>
<h3>Version 0.2.7 on 19-Sept-2014</h3>
<ul>
<li><a href="https://github.com/clojure/tools.namespace/commit/27194f2edfe3f5f9e1343f993beca4b43f0bafe8">Revert bad commit</a>
mistakenly included in 0.2.6 which could cause the tracker's
'unload' order to be incorrect. See discussion at [TNS-20].</li>
</ul>
<h3><strong>BROKEN</strong> Version 0.2.6 on 7-Sept-2014 <strong>DO NOT USE</strong></h3>
<ul>
<li><p><code>clojure.tools.namespace.parse/read-ns-decl</code> asserts that its
argument is a PushbackReader, instead of silently returning nil</p></li>
<li><p>Fix [TNS-22]: broken <code>clojure.string/replace</code> with Windows path
separator</p></li>
</ul>
<h3>Version 0.2.5 on 15-Jul-2014</h3>
<ul>
<li><p>New <code>clojure.tools.namespace.repl/clear</code> empties the state of the
REPL dependency tracker. This can help repair the dependency
tracker after a failed load or a circular dependency error.</p></li>
<li><p>Enhancement [TNS-19]: <code>deps-from-ns-decl</code> should return an empty
set instead of nil. This may be a breaking change for some but
is consistent with the original docstring.</p></li>
<li><p>Enhancement [TNS-18]: Compute transitive dependencies in linear time.</p></li>
<li><p>Enhancement [TNS-17]: The <code>ns</code> form doesn't need to be the first
top-level form in a file.</p></li>
<li><p>Fix [TNS-16]: Don't depend on specific hash ordering in tests.
Exposed by new hash functions in Clojure 1.6.0.</p></li>
<li><p>Fix [TNS-15]: Handle spaces in classpath directories (old
<code>clojure.tools.namespace</code>)</p></li>
<li><p>Fix [TNS-12]: Duplicate definition of <code>jar-file?</code></p></li>
</ul>
<h3>Version 0.2.4 on 19-Jul-2013</h3>
<ul>
<li><p>Fix [TNS-10]: Forbid circular dependency when a namespace depends
on itself</p></li>
<li><p>Fix [TNS-9] and [TNS-11]: support other prefix-list forms</p></li>
<li><p>Fix [TNS-8]: In <code>move-ns</code>, do not modify files whose contents does
not change</p></li>
</ul>
<h3>Version 0.2.3 on 01-Apr-2013</h3>
<ul>
<li>New: Attempt recovery of aliases/refers in REPL after error</li>
</ul>
<h3>Version 0.2.2 on 14-Dec-2012</h3>
<ul>
<li><p>New: Add <code>:after</code> option to <code>refresh</code></p></li>
<li><p>New: Add <code>clojure.tools.namespace.move</code></p></li>
<li><p>Fix [TNS-4], reflection warnings</p></li>
</ul>
<h3>Version 0.2.1 on 26-Oct-2012</h3>
<ul>
<li><p>Fix: Restore deprecated 0.1.x APIs in <code>clojure.tools.namespace</code></p></li>
<li><p>Fix [TNS-3], actually use <code>refresh-dirs</code></p></li>
</ul>
<h3>Version 0.2.0 on 05-Oct-2012</h3>
<ul>
<li><p><strong>Not recommended for use</strong>: this release introduced breaking API
changes (renaming core namespaces and functions) without
backwards-compatibility. Applications with dependencies on both
the 0.2.x and 0.1.x APIs cannot use this version.</p></li>
<li><p>New dependency tracking & reloading features</p></li>
<li><p>Eliminate dependency on [java.classpath]</p></li>
</ul>
<h3>Version 0.1.3 on 24-Apr-2012</h3>
<ul>
<li>Fix [TNS-1] Workaround for Clojure 1.2 reader bug</li>
</ul>
<h3>Version 0.1.2 on 10-Feb-2012</h3>
<ul>
<li>Fix: Eliminate reflection warnings</li>
</ul>
<h3>Version 0.1.1 on 18-May-2011</h3>
<h3>Version 0.1.0 on 24-Apr-2011</h3>
<ul>
<li>Source-compatible with clojure.contrib.find-namespaces in old
clojure-contrib 1.2.0</li>
</ul>
<h2>Copyright and License</h2>
<p>Copyright © 2012 Stuart Sierra All rights reserved. The use and
distribution terms for this software are covered by the
[Eclipse Public License 1.0] which can be found in the file
epl-v10.html at the root of this distribution. By using this software
in any fashion, you are agreeing to be bound by the terms of this
license. You must not remove this notice, or any other, from this
software.</p>
</body>
</html>
|