Right now we have code that looks like:
# Where root_dep is a Dependency and deps_loader is a DEPSLoader.
deps_content = deps_loader.Load(
root_dep.deps_repo_url,
root_dep.deps_repo_revision,
root_dep.deps_file)
That's a code smell since it means common/deps_parser.py is tightly coupled with the guts of common/dependency.py. It'd be a lot cleaner to have a method on the Dependency class which accepts the DEPSLoader as an argument.
Also we have code that closes over root_dep to get at deps_file, but then forces callers to patch things up after the fact with SetParent. Why not just call SetParent directly?
Comment 1 by st...@chromium.org
, Dec 14 2016