Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Project.packageManager #2764

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/dub/commandline.d
Original file line number Diff line number Diff line change
Expand Up @@ -2712,7 +2712,7 @@ class DustmiteCommand : PackageBuildCommand {
foreach (ref subp; recipe.subPackages)
if (subp.path.length) {
auto sub_path = base_path ~ NativePath(subp.path);
auto pack = prj.packageManager.getOrLoadPackage(sub_path);
auto pack = dub.packageManager.getOrLoadPackage(sub_path);
fixPathDependencies(pack.recipe, sub_path);
pack.storeInfo(sub_path);
} else fixPathDependencies(subp.recipe, base_path);
Expand Down
2 changes: 0 additions & 2 deletions source/dub/generators/build.d
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@ string computeBuildName(string config, in GeneratorSettings settings, const stri

class BuildGenerator : ProjectGenerator {
private {
PackageManager m_packageMan;
NativePath[] m_temporaryFiles;
}

this(Project project)
{
super(project);
m_packageMan = project.packageManager;
}

override void generateTargets(GeneratorSettings settings, in TargetInfo[string] targets)
Expand Down
2 changes: 0 additions & 2 deletions source/dub/generators/visuald.d
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ import std.uuid;

class VisualDGenerator : ProjectGenerator {
private {
PackageManager m_pkgMgr;
string[string] m_projectUuids;
}

this(Project project)
{
super(project);
m_pkgMgr = project.packageManager;
}

override void generateTargets(GeneratorSettings settings, in TargetInfo[string] targets)
Expand Down
1 change: 1 addition & 0 deletions source/dub/project.d
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class Project {
@property inout(SelectedVersions) selections() inout { return m_selections; }

/// Package manager instance used by the project.
deprecated("Use `Dub.packageManager` instead")
@property inout(PackageManager) packageManager() inout { return m_packageManager; }

/** Determines if all dependencies necessary to build have been collected.
Expand Down
Loading