Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg_ref() returns indefinite list for $version ? #318

Open
paulie-of-punskas opened this issue Oct 10, 2023 · 1 comment
Open

pkg_ref() returns indefinite list for $version ? #318

paulie-of-punskas opened this issue Oct 10, 2023 · 1 comment
Assignees
Labels
Discussion Looking for input

Comments

@paulie-of-punskas
Copy link
Collaborator

When running pkg_ref() alone, an indefinite(?) nested list is created for version object:

image

On the other hand, if I call the object directly, it returns me a single list:

image

Code used for reproducing the issue:

# === load riskmetric library
library("riskmetric")
library("magrittr")

# === create testing environment
dir.create(paste0(tempdir(), "/test_riskmetric"))
dir.create(paste0(tempdir(), "/test_riskmetric/source"))
dir.create(paste0(tempdir(), "/test_riskmetric/library"))
dir.create(paste0(tempdir(), "/test_riskmetric/downloads"))

# === download and unpack files
pkgs <- c("askpass", "dplyr", "openssl")
download.packages(pkgs, destdir = paste0(tempdir(), "/test_riskmetric/downloads"))

lapply(list.files(paste0(tempdir(), "/test_riskmetric/downloads"), full.names = TRUE),
       untar, 
       exdir = paste0(tempdir(), "/test_riskmetric/source"))

# === get license
pkg_references <- lapply(pkgs, function(xx) { pkg_ref(x = paste0(tempdir(), "/test_riskmetric/source/", xx)) } )
@emilliman5 emilliman5 self-assigned this Oct 10, 2023
@emilliman5 emilliman5 added the Bug Something isn't working label Oct 10, 2023
@emilliman5
Copy link
Collaborator

This is a result of the package_version class, not {riskmetric}. At this point I'm not sure this causes any problems with the current workflows to analyze the risk of a package. I will keep this open and discuss with others before closing or changing the class of the version slot.

Screen Shot 2023-10-24 at 3 34 07 PM

@emilliman5 emilliman5 added Discussion Looking for input and removed Bug Something isn't working labels Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Looking for input
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants