Utilities for resolving and loading namespaces.
Operations are parallel wherever it makes sense and it's safe to do so; efficiency matters particularly for large projects/classpaths.
Utilities for resolving and loading namespaces. Operations are parallel wherever it makes sense and it's safe to do so; efficiency matters particularly for large projects/classpaths.
(canonical-source ns)
Returns the URL of the source file for the namespace object or symbol, according to the canonical naming convention, if present on the classpath.
Returns the URL of the source file for the namespace object or symbol, according to the canonical naming convention, if present on the classpath.
(classpath-namespaces)
(classpath-namespaces classpath-urls)
Returns all namespaces defined in sources on the classpath or the specified classpath URLs.
Returns all namespaces defined in sources on the classpath or the specified classpath URLs.
(ensure-namespace ns)
Renamed - please use #'ensure-namespace!
instead.
Renamed - please use `#'ensure-namespace!` instead.
(ensure-namespace! ns)
Require ns
(no-op if already loaded). Return the symbol if successful,
and nil
if this fails.
Require `ns` (no-op if already loaded). Return the symbol if successful, and `nil` if this fails.
(has-tests? ns)
Returns a truthy value if the namespace has any vars with :test
metadata.
Returns a truthy value if the namespace has any vars with `:test` metadata.
(in-project? url)
Whether the URL is in the current project's directory.
Whether the URL is in the current project's directory.
(inlined-dependency? namespace)
Returns true if the namespace matches one of our, or eastwood's, inlined dependencies.
Returns true if the namespace matches one of our, or eastwood's, inlined dependencies.
(internal-namespace? namespace & [prefixes])
Returns true if the namespace matches the given prefixes.
Returns true if the namespace matches the given prefixes.
(jvm-clojure-resource-name->ns-name resource-name)
Given a .clj or .clj resource-name
, returns its namespace name.
Given a .clj or .clj `resource-name`, returns its namespace name.
(load-project-namespaces)
Require and return all namespaces validly defined in the current project.
Require and return all namespaces validly defined in the current project.
(loaded-namespaces & [filter-regexps])
Returns all loaded namespaces, except those coming from inlined dependencies.
filter-regexps
is used to filter out namespaces matching regexps.
Returns all loaded namespaces, except those coming from inlined dependencies. `filter-regexps` is used to filter out namespaces matching regexps.
(loaded-project-namespaces)
Return all loaded namespaces defined in the current project.
Return all loaded namespaces defined in the current project.
(project-namespaces)
Returns all namespaces defined in sources within the current project.
Returns all namespaces defined in sources within the current project.
(read-namespace url)
Returns the namespace name from the first top-level ns
form in the file.
Returns the namespace name from the first top-level `ns` form in the file.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close