lice-comb.deps

Functionality related to combing tools.deps dependency maps and lib maps for license information.

dep->expressions

(dep->expressions dep)

Returns a set of SPDX expressions (Strings) for dep. See dep->expressions-info for details.

dep->expressions-info

multimethod

(dep->expressions-info [ga info :as dep])

Returns an expressions-info map for dep (a MapEntry or two-element vector of ['group-id/artifact-id dep-info]), or nil if no expressions were found.

dep->locations

multimethod

(dep->locations [ga info :as dep])

Returns a sequence of Strings representing locations that may be searched for license information for dep (a MapEntry or two-element vector of ['group-id/artifact-id dep-info]), or nil if no locations were found.

dep->pom-uri

(dep->pom-uri dep)

Returns a URI that points to the pom for dep (a MapEntry or two-element vector of ['group-id/artifact-id dep-info]), or nil if dep is not a Maven dep, or a POM could not be found for it. When non-nil, the returned URI is guaranteed to be resolvable - either to a file that exists in the local Maven cache, or to an HTTP-accessible resource on a remote Maven artifact repository (e.g. Maven Central or Clojars).

dep->version

multimethod

(dep->version [ga info :as dep])

Returns the Maven version (as a String) for dep (a MapEntry or two-element vector of ['group-id/artifact-id dep-info]), or nil if no version was found.

deps-expressions

(deps-expressions deps)

Takes a tools.dep lib map and returns a new lib map with an expressions-info map assoc’ed into each dep’s info map, in key :lice-comb/license-info. If no license information was found for a given dep, the lib map entry for that dep will be returned unchanged (it will not have the :lice-comb/license-info key in the info map).

init!

(init!)

Initialises this namespace upon first call (and does nothing on subsequent calls), returning nil. Consumers of this namespace are not required to call this fn, as initialisation will occur implicitly anyway; it is provided to allow explicit control of the cost of initialisation to callers who need it.

Note: this method may have a substantial performance cost.