Skip to content

Commit

Permalink
Use the proper constructor for PackageDependency
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Geod24 committed Feb 15, 2024
1 parent 7df06ec commit 37c772a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/dub/package_.d
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}


Expand Down
2 changes: 1 addition & 1 deletion source/dub/project.d
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit 37c772a

Please sign in to comment.