diff --git a/source/dub/project.d b/source/dub/project.d index 0f4ce82746..a38067cfd0 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -234,6 +234,12 @@ class Project { else return null; } + /// ditto + inout(Package) getDependency(PackageName name, bool is_optional) + inout { + return getDependency(name.toString, is_optional); + } + /** Returns the name of the default build configuration for the specified target platform. @@ -1946,9 +1952,13 @@ public class SelectedVersions { is a path based selection, or its `Dependency.version_` property is valid and it is a version selection. */ - deprecated("Use the overload that accepts a `PackageName`") Dependency getSelectedVersion(string packageId) const { + // TODO: we want to deprecate this overload, however we can't really do + // that until the selectedPackages exposes PackageName, otherwise this + // doesn't work without warning, but obviously should: + // foreach (key; project.selections.selectedPackages) + // ... = project.selections.getSelectedVersion(key); const name = PackageName(packageId); return this.getSelectedVersion(name); }