diff --git a/source/app.d b/source/app.d index 699b030..6f67a61 100644 --- a/source/app.d +++ b/source/app.d @@ -165,11 +165,6 @@ dub.install(name, new Dependency("~master"), location); } } - /*if( add_dependency ){ - dub.loadPackageFromCwd(); - dub.addDependency(...); - } - */ break; case "uninstall": enforce(args.length >= 2, "Missing package name."); diff --git a/source/dub/package_.d b/source/dub/package_.d index dd52a4f..39d2229 100644 --- a/source/dub/package_.d +++ b/source/dub/package_.d @@ -237,25 +237,6 @@ assert(false); } - /// Adds an dependency, if the package is already a dependency and it cannot be - /// merged with the supplied dependency, an exception will be generated. - void addDependency(string packageId, const Dependency dependency) { - /*Dependency dep = new Dependency(dependency); - if(packageId in m_info.dependencies) { - dep = dependency.merge(m_info.dependencies[packageId]); - if(!dep.valid()) throw new Exception("Cannot merge with existing dependency."); - } - m_info.dependencies[packageId] = dep;*/ - assert(false); - } - - /// Removes a dependecy. - void removeDependency(string packageId) { - /*if (packageId in m_info.dependencies) - m_info.dependencies.remove(packageId);*/ - assert(false); - } - bool hasDependency(string depname, string config) const { if (depname in m_info.buildSettings.dependencies) return true; diff --git a/source/dub/project.d b/source/dub/project.d index cc358c2..3afb24b 100644 --- a/source/dub/project.d +++ b/source/dub/project.d @@ -406,23 +406,6 @@ } } - /// Tries to add the specified dependency. - /// If an existing dependencies is already current, this one is compared to - /// the supplied one, in order to check if these are compatible. - /// @return true, if the dependency was succesfully added, false if the - /// new dependency cannot be added because of current settings. - bool tryAddDependency(string packageId, const Dependency dependency) { - try { - m_main.addDependency(packageId, dependency); - m_main.writeJson(m_root); - return true; - } - catch(Exception e) { - logError("The dependency '%s' '%s' could not be added. Try to check the package.json of your project if this is a conflict with an existing dependency.", packageId, dependency); - return false; - } - } - private bool gatherMissingDependencies(PackageSupplier[] packageSuppliers, DependencyGraph graph) { RequestedDependency[string] missing = graph.missing();