Add additional logging to dependency processing functionality

Hopefully this will help with dependency resolution errors in the future
This commit is contained in:
Ethan Paul 2020-12-16 19:14:03 -05:00
parent c1d1ac2de1
commit e77c859355
No known key found for this signature in database
GPG Key ID: C5F5542B54A4D9C6

View File

@ -72,7 +72,6 @@ def find_transients(packages: PackageMap, dependency_name: str) -> Set[PoetryPac
reporter.verbosity2( reporter.verbosity2(
f"{constants.REPORTER_PREFIX} Skip {name}: designated unsafe by Poetry" f"{constants.REPORTER_PREFIX} Skip {name}: designated unsafe by Poetry"
) )
return dict() return dict()
transients: PackageMap = {} transients: PackageMap = {}
@ -87,11 +86,20 @@ def find_transients(packages: PackageMap, dependency_name: str) -> Set[PoetryPac
f"{constants.REPORTER_PREFIX} Skip {package}: incompatible platform requirement '{package.platform}' for current platform '{sys.platform}'" f"{constants.REPORTER_PREFIX} Skip {package}: incompatible platform requirement '{package.platform}' for current platform '{sys.platform}'"
) )
else: else:
reporter.verbosity2(f"{constants.REPORTER_PREFIX} Include {package}") reporter.verbosity2(
f"{constants.REPORTER_PREFIX} Including {package} for installation"
)
transients[name] = package transients[name] = package
for dep in package.requires: for index, dep in enumerate(package.requires):
reporter.verbosity2(
f"{constants.REPORTER_PREFIX} Processing dependency {index + 1}/{len(package.requires)} for {package}: {dep.name}"
)
if dep.name not in searched: if dep.name not in searched:
transients.update(find_deps_of_deps(dep.name, searched)) transients.update(find_deps_of_deps(dep.name, searched))
else:
reporter.verbosity2(
f"{constants.REPORTER_PREFIX} Package with name '{dep.name}' has already been processed, skipping"
)
return transients return transients