API for alpha - tools.deps.alpha 0.9.746-SNAPSHOT (in development)


Full namespace name: clojure.tools.deps.alpha

Overview





Public Variables and Functions



calc-basis

function
Usage: (calc-basis master-edn)
       (calc-basis master-edn {:keys [resolve-args classpath-args]})
Calculates and returns the runtime basis from a master deps edn map, modifying
 resolve-deps and make-classpath args as needed.

  master-edn - a master deps edn map
  args - an optional map of arguments to constituent steps, keys:
    :resolve-args - map of args to resolve-deps, with possible keys:
      :extra-deps
      :override-deps
      :default-deps
      :threads - number of threads to use during deps resolution
      :trace - flag to record a trace log
    :classpath-args - map of args to make-classpath-map, with possible keys:
      :extra-paths
      :classpath-overrides

Returns the runtime basis, which is the initial deps edn map plus these keys:
  :resolve-args - the resolve args passed in, if any
  :classpath-args - the classpath args passed in, if any
  :libs - lib map, per resolve-deps
  :classpath - classpath map per make-classpath-map

    
    
    Source
  


combine-aliases

function
Usage: (combine-aliases edn-map alias-kws)
Find, read, and combine alias maps identified by alias keywords from
a deps edn map into a single args map.

    
    
    Source
  


find-edn-maps

function
Usage: (find-edn-maps)
       (find-edn-maps project-edn-file)
Finds and returns standard deps edn maps in a map with keys
  :root-edn, :user-edn, :project-edn
If no project-edn is supplied, use the deps.edn in current directory

    
    
    Source
  


join-classpath

function
Usage: (join-classpath roots)
Takes a coll of string classpath roots and creates a platform sensitive classpath

    
    
    Source
  


lib-location

function
Usage: (lib-location lib coord deps-config)
Find the file path location of where a lib/coord would be located if procured
without actually doing the procuring!

    
    
    Source
  


make-classpath

function
Usage: (make-classpath lib-map paths classpath-args)
Takes a lib map, and a set of explicit paths. Extracts the paths for each chosen
lib coordinate, and assembles a classpath string using the system path separator.
The classpath-args is a map with keys that can be used to modify the classpath
building operation:

  :extra-paths - extra classpath paths to add to the classpath
  :classpath-overrides - a map of lib to path, where path is used instead of the coord's paths

Returns the classpath as a string.
Specs:
  Args: (cat
         :libs :clojure.tools.deps.alpha.specs/lib-map
         :paths :clojure.tools.deps.alpha.specs/paths
         :classpath-args :clojure.tools.deps.alpha.specs/classpath-args)
  Ret:  string?
Source


make-classpath-map

function
Usage: (make-classpath-map {:keys [paths aliases], :as deps-edn-map} lib-map {:keys [classpath-overrides extra-paths], :as classpath-args})
Takes a merged deps edn map and a lib map. Extracts the paths for each chosen
lib coordinate, and assembles a classpath map. The classpath-args is a map with
keys that can be used to modify the classpath building operation:

  :extra-paths - extra classpath paths to add to the classpath
  :classpath-overrides - a map of lib to path, where path is used instead of the coord's paths

Returns the classpath as a map from a path entry (string) to a map describing where its from,
with either a :lib-name or :path-key entry.

    
    
    Source
  


merge-edns

function
Usage: (merge-edns deps-edn-maps)
Merge multiple deps edn maps from left to right into a single deps edn map.

    
    
    Source
  


print-tree

function
Usage: (print-tree lib-map)
Print lib-map tree to the console

    
    
    Source
  


resolve-deps

function
Usage: (resolve-deps deps-map args-map)
Takes a deps configuration map and resolves the transitive dependency graph
from the initial set of deps. args-map is a map with several keys (all
optional) that can modify the results of the transitive expansion:

  :extra-deps - a map from lib to coord of deps to add to the main deps
  :override-deps - a map from lib to coord of coord to use instead of those in the graph
  :default-deps - a map from lib to coord of deps to use if no coord specified
  :trace - boolean. If true, the returned lib map will have metadata with :trace log
  :threads - long. If provided, sets the number of concurrent download threads

Returns a lib map (map of lib to coordinate chosen).
Specs:
  Args: (cat
         :deps :clojure.tools.deps.alpha.specs/deps-map
         :options :clojure.tools.deps.alpha.specs/resolve-args)
  Ret:  (map-of
          :clojure.tools.deps.alpha.specs/lib
          :clojure.tools.deps.alpha.specs/resolved-coord)
Source


root-deps

function
Usage: (root-deps)
Read the root deps.edn resource from the classpath at the path
clojure/tools/deps/deps.edn

    
    
    Source
  


slurp-deps

function
Usage: (slurp-deps dep-file)
Read a single deps.edn file from disk and canonicalize symbols,
return a deps map.

    
    
    Source
  


tool

function
Usage: (tool project-edn tool-args)
Transform project edn for tool by applying tool args (keys = :paths, :deps) and
returning an updated project edn.

    
    
    Source
  


user-deps-path

function
Usage: (user-deps-path)
Use the same logic as clj to calculate the location of the user deps.edn.
Note that it's possible no file may exist at this location.

    
    
    Source
  

alpha.extensions





Public Variables and Functions



canonicalize

multimethod
No usage documentation available
Takes a lib and coordinate and returns a canonical form.
For example, a Maven coordinate might resolve LATEST to a version or a Git
coordinate might resolve a partial sha to a full sha. Returns [lib coord].

    
    
    Source
  


compare-versions

multimethod
No usage documentation available
Given two coordinates, use this as a comparator returning a negative number, zero,
or positive number when coord-x is logically 'less than', 'equal to', or 'greater than'
coord-y. The dispatch occurs on the type of x and y.

    
    
    Source
  


coord-deps

multimethod
No usage documentation available
Return coll of immediate [lib coord] external deps for this library.

    
    
    Source
  


coord-paths

multimethod
No usage documentation available
Return coll of classpath roots for this library on disk.

    
    
    Source
  


coord-summary

multimethod
No usage documentation available
Takes a coord, and returns a concise description, used when printing tree

    
    
    Source
  


coord-type

function
Usage: (coord-type coord)
The namespace (as a keyword) of the only qualified key in the coordinate,
excluding the reserved deps namespace.

    
    
    Source
  


dep-id

multimethod
No usage documentation available
Returns an identifier value that can be used to detect a lib/coord cycle while
expanding deps. This will only be called after canonicalization so it can rely
on the canonical form.

    
    
    Source
  


detect-manifest

function
Usage: (detect-manifest dir)
Given a directory, detect the manifest type and return the manifest info.

    
    
    Source
  


lib-location

multimethod
No usage documentation available
Takes a coordinate and returns the location where the lib would be
installed locally. Location keys:

:base     local repo base directory path
:path     path within base dir
:type     coordinate type

    
    
    Source
  


manifest-type

multimethod
No usage documentation available
Takes a lib, a coord, and the root config. Dispatch based on the
coordinate type. Detect and return the manifest type and location
for this coordinate.

    
    
    Source
  

alpha.gen.pom





Public Variables and Functions



sync-pom

function
Usage: (sync-pom {:keys [basis params]})
       (sync-pom {:keys [deps paths :mvn/repos], :as deps-edn} dir)
Creates or synchronizes a pom given a map of :basis and :params.

From basis, uses:
  :deps to build <dependencies>
  :paths to build <srcDirectory>
  :mvn/repos to build <repositories> (omits maven central, included by default)

Params:
  :target-dir Path to target output directory (required)
  :src-pom Path to source pom file (optional, default = "pom.xml")
  :lib Symbol of groupId/artifactId (required for new, optional for existing)
  :version String of project version (optional)

    
    
    Source
  

alpha.tools.install





Public Variables and Functions



install

function
Usage: (install {:keys [lib jar pom classifier local-repo], :as opts})
Install a jar and optional pom to the Maven local cache.
The group/artifact/version coordinate will be pulled from the
pom
if supplied, or the pom in the jar file, or must be provided.
Any provided attributes override those in the pom/jar.

  Options:
    :jar (required) - path to jar file
    :pom (optional) - path to pom file
    :lib (optional) - qualified symbol like my.org/lib
    :version (optional) - string
    :classifier (optional) - string
    :local-repo (optional) - path to local repo (default = ~/.m2/repository)

    
    
    Source
  

alpha.util.dir





Public Variables and Functions



*the-dir*

dynamic var

    
Thread-local directory context for resolving relative directories.
Defaults to current directory. Should always hold an absolute directory
java.io.File, never null.

    
    
    Source
  


as-canonical

function
Usage: (as-canonical dir)
As canonical File in terms of the current directory context

    
    
    Source
  


canonicalize

function
Usage: (canonicalize f)
Make canonical File in terms of the current directory context.
f may be either absolute or relative.

    
    
    Source
  


with-dir

macro
Usage: (with-dir dir & body)
Push directory into current directory context for execution of body.

    
    
    Source
  

alpha.util.io





Public Variables and Functions



printerrln

function
Usage: (printerrln & msgs)
println to *err*

    
    
    Source
  


read-edn

function
Usage: (read-edn reader)
Read the edn file from the specified `reader`.
This file should contain a single edn value. Empty files return nil.
The reader will be read to EOF and closed.

    
    
    Source
  


slurp-edn

function
Usage: (slurp-edn f)
Read the edn file specified by f, a string or File.
An empty file will return nil.

    
    
    Source
  


write-file

function
Usage: (write-file f s)
Write the string s to file f. Creates parent directories for f if they don't exist.

    
    
    Source
  

alpha.util.maven





Public Variables and Functions



lib->names

function
Usage: (lib->names lib)
Split lib symbol into [group-id artifact-id classifier]

    
    
    Source
  

alpha.util.s3-transporter





Public Variables and Functions



s3-peek

function
Usage: (s3-peek s3-client bucket path)
Returns nil if path exists, anomaly category otherwise

    
    
    Source
  

alpha.util.session

Maintains session resources during or across runs of the resolver

Public Variables and Functions



retrieve

function
Usage: (retrieve key)
       (retrieve key if-absent-fn)
Read the current value of key from the session. If absent, and if-absent-fn
is supplied, invoke the fn, set it in the session (if there is one),
and return the value.

    
    
    Source
  


with-session

macro
Usage: (with-session & body)
Create a new empty session and execute the body

    
    
    Source
  
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.