Skip to content

Commit

Permalink
Deprecate string-as-version PackageManager.getBestPackage overload
Browse files Browse the repository at this point in the history
Because using a typed Version or VersionRange is better than using
a string and we want to encourage version validation to be done
earlier than later.
  • Loading branch information
Geod24 authored and dlang-bot committed Dec 21, 2023
1 parent 6fb9065 commit 9042747
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/dub/packagemanager.d
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ class PackageManager {
}

/// Ditto
deprecated("Use the overload that accepts a `Version` or a `VersionRange`")
Package getBestPackage(string name, string range)
{
return this.getBestPackage(name, VersionRange.fromString(range));
Expand Down

0 comments on commit 9042747

Please sign in to comment.