Skip to content

Commit

Permalink
add add-lib reference in faq
Browse files Browse the repository at this point in the history
  • Loading branch information
puredanger committed Dec 18, 2023
1 parent 69eb052 commit 9a5d263
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/guides/faq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ tools.deps aims to provide programmatic building blocks for dependency resolutio
[[clj_dynamic]]
**<<faq#clj_dynamic,Do these tools allow you to dynamically add dependencies to a running repl?>>**

No. Other tools exist to do this now or could be added on top of the existing functionality but this was not part of the initial goal.
Yes (since Clojure 1.12) - see <<xref/../../../reference/repl_and_main#add_lib,add-lib>>.

[[clj_standalone]]
**<<faq#clj_standalone,How can I create a single-file Clojure script, ideally self-invokable via a https://en.wikipedia.org/wiki/Shebang_(Unix)[shebang line]?>>**
Expand Down
2 changes: 1 addition & 1 deletion content/reference/repl_and_main.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ If you switch to a different namespace (with `in-ns` or `ns`), these functions w

Also, the Clojure runtime will look for and load the `user` namespace on startup if it is found. Generally, this should only be used to provide development-time faciliities, and not in a production scenario.

[[add-lib]]
[[add_lib]]
== Adding libraries for interactive use

The <<xref/../../../guides/install_clojure#,Clojure CLI>> can be used to <<deps_edn#,declare dependencies>> loaded at REPL startup time. Since Clojure 1.12, you can also dynamically load libraries at the REPL for interactive use. These functions are available in the `tools.deps.repl` namespace:
Expand Down

0 comments on commit 9a5d263

Please sign in to comment.