Liking cljdoc? Tell your friends :D

orchard.namespace

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.
raw docstring

canonical-sourceclj

(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.
sourceraw docstring

classpath-namespacesclj

(classpath-namespaces)
(classpath-namespaces classpath-urls)
(classpath-namespaces classpath-urls extract-fn)

Returns all namespaces (by default: of .clj or .cljc extension) defined in sources on the classpath or the specified classpath URLs.

Returns all namespaces (by default: of .clj or .cljc extension)
defined in sources on the classpath or the specified classpath URLs.
sourceraw docstring

ensure-namespacecljdeprecated

(ensure-namespace ns)

Renamed - please use #'ensure-namespace! instead.

Renamed - please use `#'ensure-namespace!` instead.
sourceraw docstring

ensure-namespace!clj

(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.
sourceraw docstring

has-tests?clj

(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.
sourceraw docstring

in-project?clj

(in-project? url)

Whether the URL is in the current project's directory.

Whether the URL is in the current project's directory.
sourceraw docstring

inlined-dependency?clj

(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.
sourceraw docstring

internal-namespace?clj

(internal-namespace? namespace & [prefixes])

Returns true if the namespace matches the given prefixes.

Returns true if the namespace matches the given prefixes.
sourceraw docstring

jvm-clojure-resource-name->ns-formclj

(jvm-clojure-resource-name->ns-form resource-name)

Given a .clj or .cljc resource-name, returns its ns form.

Given a .clj or .cljc `resource-name`, returns its `ns` form.
sourceraw docstring

jvm-clojure-resource-name->ns-nameclj

(jvm-clojure-resource-name->ns-name resource-name)

Given a .clj or .cljc resource-name, returns its namespace name.

Given a .clj or .cljc `resource-name`, returns its namespace name.
sourceraw docstring

load-project-namespacesclj

(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.
sourceraw docstring

loaded-namespacesclj

(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.
sourceraw docstring

loaded-project-namespacesclj

(loaded-project-namespaces)

Return all loaded namespaces defined in the current project.

Return all loaded namespaces defined in the current project.
sourceraw docstring

ns-form-importsclj

(ns-form-imports ns-form)

Given a ns form, returns its :imports as fully-qualified Java class names, expressed as symbols.

Prefix notation is undone, so that all returned members are simple symbols that can be resolved to a class directly.

Given a `ns` form, returns its `:imports` as fully-qualified Java class names,
expressed as symbols.

Prefix notation is undone, so that all returned members are simple symbols
that can be resolved to a class directly.
sourceraw docstring

project-namespacesclj

(project-namespaces)

Returns all JVM Clojure namespaces defined in sources within the current project.

Returns all JVM Clojure namespaces defined in sources within the current project.
sourceraw docstring

project-ns-formsclj

(project-ns-forms)

Returns all JVM Clojure ns forms defined in sources within the current project, indexed by ns-name.

Returns all JVM Clojure `ns` forms defined in sources within the current project,
indexed by `ns-name`.
sourceraw docstring

project-rootclj

source

read-namespacecljdeprecated

(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.
sourceraw docstring

read-ns-formclj

(read-ns-form url)

Returns the first top-level ns form in the file.

Returns the first top-level `ns` form in the file.
sourceraw docstring

read-ns-nameclj

(read-ns-name 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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close