SelectedVersions

Holds and stores a set of version selections for package dependencies.

This is the runtime representation of the information contained in "dub.selections.json" within a package's directory.

Constructors

this
this()

Constructs a new empty version selection.

this
this(Json data)

Constructs a new version selection from JSON data.

this
this(NativePath path)

Constructs a new version selections from an existing JSON file.

Members

Functions

bare
bool bare()

Determine if this set of selections is still empty (but not cleared).

clear
void clear()

Removes all selections.

deselectVersion
void deselectVersion(string package_id)

Removes the selection for a particular package.

dirty
bool dirty()

Determines if any changes have been made after loading the selections from a file.

getSelectedVersion
Dependency getSelectedVersion(string packageId)

Returns the selection for a particular package.

hasSelectedVersion
bool hasSelectedVersion(string packageId)

Determines if a particular package has a selection set.

save
void save(NativePath path)

Stores the selections to disk.

selectVersion
void selectVersion(string package_id, Version version_)

Selects a certain version for a specific package.

selectVersion
void selectVersion(string package_id, NativePath path)

Selects a certain path for a specific package.

selectedPackages
string[] selectedPackages()

Returns a list of names for all packages that have a version selection.

set
void set(SelectedVersions versions)

Duplicates the set of selected versions from another instance.

Manifest constants

defaultFile
enum defaultFile;

Default file name to use for storing selections.

Meta