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

clear
void clear()

Removes all selections.

deselectVersion
void deselectVersion(string package_id)

Removes the selection for a particular package.

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.

serialize
Json serialize()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

Properties

bare
bool bare [@property getter]

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

dirty
bool dirty [@property getter]

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

selectedPackages
string[] selectedPackages [@property getter]

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

Static functions

dependencyFromJson
Dependency dependencyFromJson(Json j)
Undocumented in source. Be warned that the author may not have intended to support it.
dependencyToJson
Json dependencyToJson(Dependency d)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta