From 21ec8a67ddff9c97596679956bdfc9234d35cf69 Mon Sep 17 00:00:00 2001 From: pat-s Date: Fri, 17 Apr 2026 18:20:00 +0200 Subject: [PATCH] feat: save package+version pairs instead of just package names packages-to-build.R now saves the full (Package, Version) data.table so the build step can pass specific tags to build_binary_package(), eliminating redundant per-package tag discovery and S3 checks. Also reduces archive versions from 9 to 4 (+ 1 release = 5 total). --- local/packages-to-build.R | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/local/packages-to-build.R b/local/packages-to-build.R index 9d19b0b..4e6d754 100644 --- a/local/packages-to-build.R +++ b/local/packages-to-build.R @@ -48,11 +48,12 @@ archive_versions <- rbindlist( fill = TRUE ) -# Select the 9 most recent by mtime for each package +# Select the 4 most recent archive versions by mtime for each package +# Combined with the 1 release version = 5 versions per package archive_versions <- archive_versions[ order(Package, -as.numeric(mtime)) ][, - head(.SD, 9), + head(.SD, 4), by = Package ][, .(Package, Version) @@ -128,5 +129,8 @@ setkey(errored_pkgs, Package, Version) ### Final subsetting pkgs_no_error <- pkgs_to_build[!errored_pkgs] -# only return package names -pkgs <- unique(as.character(pkgs_no_error[!s3_dt, Package])) +# Return the full (Package, Version) pairs that need building +pkgs <- pkgs_no_error[!s3_dt] +# Deduplicate +pkgs <- unique(pkgs) +setorder(pkgs, Package, Version)