You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ok next idea related to our ongoing discussion today re #106 ....
I think we should make reporters have a set_package and set_package_path separately. DependencyReporter, for example, shouldn't have to care about pkg_path.
Thoughts?
The text was updated successfully, but these errors were encountered:
jayqi
changed the title
Discussion: separate set_package and set_package_path methods
Discussion: separate set_package and set_package_path methods
Nov 30, 2018
Only FunctionReporter gets this method. Other ones don't. set_package no longer takes pkg_path as an argument.
Since this breaks the identical interface, but we still want to be able to pass it through in CreatePackageReport, we can do something like:
if (`set_package_path` %in% names(reporter)) {
reporter$set_package_path(pkg_path)
}
So it will only do it for reporters where it finds the method.
Idea 2: Use ... to allow extraneous inputs
set_package has the interface function(pkg_name, ...) so it can take extra arguments without complaining.
Only FunctionReporter will have the interface function(pkg_name, pkg_path, ...). The method will call the inherited super$set_package and then also do its pkg_path stuff.
While reviewing #129, @jameslamb had the idea:
The text was updated successfully, but these errors were encountered: