From 37c772a2df1f7ff70a9c818560d5ce1db8d138fb Mon Sep 17 00:00:00 2001 From: Mathias Lang Date: Wed, 14 Feb 2024 16:12:31 +0100 Subject: [PATCH] Use the proper constructor for PackageDependency This code was using a deprecated constructor, but as it was in lambda, it didn't trigger a deprecation message, however '-de' points us to the issue. --- source/dub/package_.d | 2 +- source/dub/project.d | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dub/package_.d b/source/dub/package_.d index 2726d57f7..0ebfea32d 100644 --- a/source/dub/package_.d +++ b/source/dub/package_.d @@ -578,7 +578,7 @@ class Package { this.recipe.configurations.map!(c => c.buildSettings.dependencies.byKeyValue) ) .joiner() - .map!(d => PackageDependency(d.key, d.value)); + .map!(d => PackageDependency(PackageName(d.key), d.value)); } diff --git a/source/dub/project.d b/source/dub/project.d index 11823921e..d708d5f5b 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -194,7 +194,7 @@ class Project { if (!cfg.length) deps = p.getAllDependencies(); else { auto depmap = p.getDependencies(cfg); - deps = depmap.byKey.map!(k => PackageDependency(k, depmap[k])).array; + deps = depmap.byKey.map!(k => PackageDependency(PackageName(k), depmap[k])).array; } deps.sort!((a, b) => a.name.toString() < b.name.toString());