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


Full namespace name: clojure.tools.deps.alpha

Overview





Public Variables and Functions



combine-aliases

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

    
    
    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 {:keys [classpath-overrides extra-paths], :as 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


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)
       (resolve-deps deps-map args-map settings)
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

settings is an optional map of settings:
  :trace - boolean. If true, the returned lib map will have metadata with :trace log

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

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.extensions.local





Public Variables and Functions



find-pom

function
Usage: (find-pom jar-file)
Find path of pom file in jar file, or nil if it doesn't exist

    
    
    Source
  

alpha.reader





Public Variables and Functions



clojure-env

var

    
Returns a map describing the environment known to clj/clojure:
{:config-files [ ... ]}.

DEPRECATED - use (reader/default-deps) instead!

    
    Deprecated since tools.deps.alpha version 0.7.516
Source


default-deps

function
Usage: (default-deps)
Use the same logic as clj to build the set of deps.edn files to load.
These can be passed to read-deps to replicate what clj does.

    
    
    Source
  


install-deps

function
Usage: (install-deps)
Read the install deps.edn resource from the classpath

    
    
    Source
  


install-deps-path

var

    
Resource path to the install deps.edn resource

    
    
    Source
  


merge-deps

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

    
    
    Source
  


read-deps

function
Usage: (read-deps deps-files)
Read the built-in clojure/tools/deps/deps.edn resource, and a set of deps-files,
and merge them left to right into a single deps map.

    
    
    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
  


user-deps-location

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

    
    
    Source
  

alpha.script.generate-manifest



Deprecated since tools.deps.alpha version Use clojure.tools.deps.alpha.script.generate-manifest2

Public Variables and Functions



-main

function
Usage: (-main & args)
Main entry point for generating a manifest file.

Required:
  --config-files DEP_FILES - comma-delimited list of deps.edn files to merge
  --config-data={...} - deps.edn as data
  --gen TYPE - manifest type to generate (currently only pom)

Options:
  -Raliases - concated resolve-deps alias names, applied to the :deps
  -Aaliases - concatenated generic alias names

    
    
    Source
  

alpha.script.generate-manifest2





Public Variables and Functions



-main

function
Usage: (-main & args)
Main entry point for generating a manifest file.

Required:
  --config-user PATH - User deps.edn location
  --config-project PATH - Project deps.edn location
  --config-data={...} - deps.edn as data
  --gen TYPE - manifest type to generate (currently only pom)

Options:
  -Raliases - concated resolve-deps alias names, applied to the :deps
  -Aaliases - concatenated generic alias names

    
    
    Source
  

alpha.script.make-classpath



Deprecated since tools.deps.alpha version Use clojure.tools.deps.alpha.script.make-classpath2

Public Variables and Functions



-main

function
Usage: (-main & args)
Main entry point for make-classpath script.

Options:
  --config-files=/install/deps.edn,... - comma-delimited list of deps.edn files to merge
  --config-data={...} - deps.edn as data
  --libs-file=path - libs cache file to write
  --cp-file=path - cp cache file to write
  --jvm-file=path - jvm opts file to write
  --main-file=path - main opts file to write
  -Rresolve-aliases - concatenated resolve-deps alias names
  -Cmakecp-aliases - concatenated make-classpath alias names
  -Jjvmopt-aliases - concatenated jvm-opt alias names
  -Mmain-aliases - concatenated main-opt alias names
  -Aaliases - concatenated generic alias names

Resolves the dependencies and updates the lib, classpath, etc files.
The libs file is at <cachedir>/<resolve-aliases>.libs
The cp file is at <cachedir>/<resolve-aliases>/<cpaliases>.cp

    
    
    Source
  


combine-deps-files

function
Usage: (combine-deps-files {:keys [config-files config-data], :as opts})
Given a configuration for config-files and optional config-data, read
and merge into a combined deps map.

    
    
    Source
  


create-classpath

function
Usage: (create-classpath deps-map {:keys [resolve-aliases makecp-aliases aliases], :as opts})
Given parsed-opts describing the input config files, and aliases to use,
return the output lib map and classpath.

    
    
    Source
  


parse-opts

function
Usage: (parse-opts args)
Parse the command line opts to make-classpath

    
    
    Source
  


run

function
Usage: (run {:keys [libs-file cp-file jvm-file main-file skip-cp resolve-aliases makecp-aliases jvmopt-aliases main-aliases aliases], :as opts})
Run make-classpath script. See -main for details.

    
    
    Source
  

alpha.script.make-classpath2





Public Variables and Functions



-main

function
Usage: (-main & args)
Main entry point for make-classpath script.

Options:
  --config-user=path - user deps.edn file (usually ~/.clojure/deps.edn)
  --config-project=path - project deps.edn file (usually ./deps.edn)
  --config-data={...} - deps.edn as data (from -Sdeps)
  --libs-file=path - libs cache file to write
  --cp-file=path - cp cache file to write
  --jvm-file=path - jvm opts file to write
  --main-file=path - main opts file to write
  -Rresolve-aliases - concatenated resolve-deps alias names
  -Cmakecp-aliases - concatenated make-classpath alias names
  -Jjvmopt-aliases - concatenated jvm-opt alias names
  -Mmain-aliases - concatenated main-opt alias names
  -Aaliases - concatenated generic alias names

Resolves the dependencies and updates the lib, classpath, etc files.
The libs file is at <cachedir>/<hash>.libs
The cp file is at <cachedir>/<hash>.cp
The main opts file is at <cachedir>/<hash>.main (if needed)
The jvm opts file is at <cachedir>/<hash>.jvm (if needed)

    
    
    Source
  


check-aliases

function
Usage: (check-aliases deps aliases)
Check that all aliases are known and warn if aliases are undeclared

    
    
    Source
  


create-classpath

function
Usage: (create-classpath deps-map {:keys [resolve-aliases makecp-aliases aliases trace], :as _opts})
Given parsed-opts describing the input config files, and aliases to use,
return the output lib map and classpath.

    
    
    Source
  


parse-opts

function
Usage: (parse-opts args)
Parse the command line opts to make-classpath

    
    
    Source
  


run

function
Usage: (run {:keys [config-user config-project libs-file cp-file jvm-file main-file skip-cp], :as opts})
Run make-classpath script. See -main for details.

    
    
    Source
  


run-core

function
Usage: (run-core {:keys [install-deps user-deps project-deps config-data resolve-aliases makecp-aliases jvmopt-aliases main-aliases aliases], :as opts})
Run make-classpath script from/to data (no file stuff)

    
    
    Source
  

alpha.script.parse





Public Variables and Functions



parse-config

function
Usage: (parse-config s)
Parses a string of edn into a deps map.

    
    
    Source
  


parse-files

function
Usage: (parse-files s)
Parses a string of comma-delimited files into a collection of
Files, filtering only those that exist.

    
    
    Source
  


parse-kws

function
Usage: (parse-kws s)
Parses a concatenated string of keywords into a collection of keywords
Ex: (parse-kws ":a:b:c") ;; returns: (:a :b :c)

    
    
    Source
  

alpha.script.print-tree





Public Variables and Functions



-main

function
Usage: (-main & args)
Main entry point for print-tree script.

Required:
  --libs-file=path - libs file

Prints the tree from libs file

    
    
    Source
  


run

function
Usage: (run {:keys [libs-file], :as _options})
Run print-tree script. See -main for details.

    
    
    Source
  

alpha.script.resolve-tags





Public Variables and Functions



-main

function
Usage: (-main & args)
Main entry point for resolve-tags script.

Required:
  --deps-file deps.edn - deps.edn files in which to resolve git tags

Read deps.edn, find git coordinates with :tag but without :sha, resolve those
tags to shas, and over-write the deps.edn.

    
    
    Source
  

alpha.util.coll





Public Variables and Functions



map-keys

function
Usage: (map-keys m f)
Apply f to each key in m

    
    
    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





Types



CustomProvider

type

    Fields: []
Protocols:
Interfaces: org.eclipse.aether.transport.wagon.WagonProvider

Public Variables and Functions



->CustomProvider

function
Usage: (->CustomProvider)
Positional factory function for class clojure.tools.deps.alpha.util.maven.CustomProvider.

    
    
    Source
  


lib->names

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

    
    
    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.