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
Issue: Initializing new PackageDependencyReporter and PackageFunctionReporter and using set_package will result in an unintuitive "Resetting cached network information..." logger statement to be printed.
The reason this happens is because the reset_cache method of AbstractPackageReporter is checking whether the cache is null. Both PackageFunctionReporter and PackageDependencyReporter start with cache as a list of several variables with null values.
The more complicated and less flexible way to fix this is to have reset_cache check if cache is a list, and then check whether each value in the list is null. This will not work well if we ever end up having cached fields that initialize as a non-null value.
Another implementation that addresses this is to have cache initialized as null with a new reporter instance, and a template default_cache that the cache gets set/reset to. See implementation in older version here and here:
The text was updated successfully, but these errors were encountered:
Issue: Initializing new
PackageDependencyReporter
andPackageFunctionReporter
and usingset_package
will result in an unintuitive "Resetting cached network information..." logger statement to be printed.To reproduce:
and
The reason this happens is because the
reset_cache
method ofAbstractPackageReporter
is checking whether thecache
is null. BothPackageFunctionReporter
andPackageDependencyReporter
start withcache
as a list of several variables with null values.The more complicated and less flexible way to fix this is to have
reset_cache
check ifcache
is a list, and then check whether each value in the list is null. This will not work well if we ever end up having cached fields that initialize as a non-null value.Another implementation that addresses this is to have
cache
initialized as null with a new reporter instance, and a templatedefault_cache
that thecache
gets set/reset to. See implementation in older version here and here:The text was updated successfully, but these errors were encountered: