sessionInfo() errors when an attached package is removed from the library
Hello everyone, I noticed that sessionInfo() results in an error when you remove a package from the library that was previously attached: library(xyz)
remove.packages("xyz")
#> Removing package from
'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library'
#> (as 'lib' is unspecified)
sessionInfo()
#> Warning in FUN(X[[i]], ...): DESCRIPTION file of package 'xyz' is
#> missing or broken
#> Error in x$Priority: $ operator is invalid for atomic vectors
If it was only loaded, only "loaded via a namespace" section fails to print
with the same error message.
Notice that this is not an issue for the {sessioninfo} package that only
warns you in a friendly way that the particular package was removed from
the library, without any errors.
The problem occurs when sessionInfo calls packageDescription on each
package on the search path.
Best,
Jan