type

LibRepo

@Js
const mixin LibRepo

Library repository is a database of Xeto libs. A repository might provide access to multiple versions per library.

methods

createNamespace

Construct a namespace for the given set of lib versions in this repo.

createOverlayNamespace

Construct a namespace that overlays the given namespace with the given list of lib versions in this repo.

cur

Current default repository for the VM

latest

Get the latest version of the library name available.

latestMatch

Get the latest version that matches the given dependency.

libs

List the library names installed in the repository.

solveDepends

Solve the dependency graph for given list of libs and return a complete dependency graph.

version

Get the info for a specific library name and version.

versions

List the verions available for given library name.

Slot Details

createNamespace

abstract LibNamespace createNamespace(LibVersion[] libs)

Construct a namespace for the given set of lib versions in this repo. This method does not solve the dependency graph. The list of lib versions passed must be a complete dependency tree that satisifies all version constraints. Also see solveDepends.

createOverlayNamespace

abstract LibNamespace createOverlayNamespace(LibNamespace base, LibVersion[] libs)

Construct a namespace that overlays the given namespace with the given list of lib versions in this repo. This method works just like createNamespace with the exception that it reuses the libs from the the base namespace. The combination of the base libs and overlay libs must be satisfy all version constraints. The overlay libs must not duplicte any libs in the base.

cur

static LibRepo cur()

Current default repository for the VM

latest

abstract LibVersion? latest(Str name, Bool checked := true)

Get the latest version of the library name available. If no versions are available then raise exception or return null based on check flag.

latestMatch

abstract LibVersion? latestMatch(LibDepend depend, Bool checked := true)

Get the latest version that matches the given dependency. If no matches are available, then raise exception or return null based on check flag.

libs

abstract Str[] libs()

List the library names installed in the repository.

solveDepends

abstract LibVersion[] solveDepends(LibDepend[] libs)

Solve the dependency graph for given list of libs and return a complete dependency graph. Raise an exception is no solution can be computed based on the installed lib versions.

version

abstract LibVersion? version(Str name, Version version, Bool checked := true)

Get the info for a specific library name and version. If the given library or version is not available then raise exception or return null based on the checked flag.

versions

abstract LibVersion[]? versions(Str name, Bool checked := true)

List the verions available for given library name. If the library is not available then raise exception or return null based on check flag.