Skip to content

setup-r-dependencies should match the lockfile exactly, by removing packages, if needed #550

Description

@gaborcsardi

The extra packages may cause problems.

Activity

  1. added
    bugan unexpected problem or unintended behavior
    on Apr 12, 2022
  2. gaborcsardi commented on Oct 19, 2022

    @gaborcsardi
    MemberAuthor

    This needs an update in pak/pkgdepends.

  3. MLopez-Ibanez commented on Jul 13, 2025

    @MLopez-Ibanez

    Maybe this bug?

    But pak is not very useful:

    ! Could not solve package dependencies:
    * deps::.: Can't install dependency testthat (>= 3.0.0)
    * testthat:
      * Can't install dependency cli (>= 3.6.1) (>= 1.0.1) (>= 1.7.5)
      * Can't install dependency evaluate (>= 1.0.1) (>= 1.7.5)
      * Can't install dependency ps (>= 1.7.5)
    * cli: cli conflicts with cli, to be installed
    * evaluate: evaluate conflicts with evaluate, to be installed
    * ps: ps conflicts with ps, to be installed
    * any::sessioninfo: dependency conflict
    * any::remotes: dependency conflict
    * any::rcmdcheck: dependency conflict
    * any::spelling: dependency conflict
    
    action log
    2025-07-13T16:40:23.5233007Z ##[group]Run # Dependency resolution
    2025-07-13T16:40:23.5233272Z �[36;1m# Dependency resolution�[0m
    2025-07-13T16:40:23.5233504Z �[36;1mcat("::group::Dependency resolution\n")�[0m
    2025-07-13T16:40:23.5250329Z �[36;1mcat("os-version=", sessionInfo()$running, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)�[0m
    2025-07-13T16:40:23.5251080Z �[36;1mr_version <-�[0m
    2025-07-13T16:40:23.5251452Z �[36;1m  if (grepl("development", R.version.string)) {�[0m
    2025-07-13T16:40:23.5251908Z �[36;1m    pdf(tempfile())�[0m
    2025-07-13T16:40:23.5252340Z �[36;1m    ge_ver <- attr(recordPlot(), "engineVersion")�[0m
    2025-07-13T16:40:23.5252780Z �[36;1m    dev.off()�[0m
    2025-07-13T16:40:23.5253343Z �[36;1m    paste0("R version ", getRversion(), " (ge:", ge_ver, "; iid:", .Internal(internalsID()), ")")�[0m
    2025-07-13T16:40:23.5253976Z �[36;1m  } else {�[0m
    2025-07-13T16:40:23.5254282Z �[36;1m    R.version.string�[0m
    2025-07-13T16:40:23.5254601Z �[36;1m  }�[0m
    2025-07-13T16:40:23.5255119Z �[36;1mcat("r-version=", r_version, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)�[0m
    2025-07-13T16:40:23.5255971Z �[36;1mneeds <- sprintf("Config/Needs/%s", strsplit("check", "[[:space:],]+")[[1]])�[0m
    2025-07-13T16:40:23.5256630Z �[36;1mif (length(needs) == 0L) needs <- NULL�[0m
    2025-07-13T16:40:23.5257203Z �[36;1mdeps <- strsplit("deps::., any::sessioninfo", "[[:space:],]+")[[1]]�[0m
    2025-07-13T16:40:23.5258046Z �[36;1mextra_deps <- strsplit("any::remotes, any::rcmdcheck, any::spelling", "[[:space:],]+")[[1]]�[0m
    2025-07-13T16:40:23.5258782Z �[36;1mdir.create(".github", showWarnings=FALSE)�[0m
    2025-07-13T16:40:23.5259294Z �[36;1mSys.setenv("PKGCACHE_HTTP_VERSION" = "2")�[0m
    2025-07-13T16:40:23.5259836Z �[36;1mlibrary(pak, lib.loc = Sys.getenv("R_LIB_FOR_PAK"))�[0m
    2025-07-13T16:40:23.5260325Z �[36;1mpak::lockfile_create(�[0m
    2025-07-13T16:40:23.5260671Z �[36;1m  c(deps, extra_deps),�[0m
    2025-07-13T16:40:23.5261060Z �[36;1m  lockfile = ".github/pkg.lock",�[0m
    2025-07-13T16:40:23.5261463Z �[36;1m  upgrade = (FALSE),�[0m
    2025-07-13T16:40:23.5261824Z �[36;1m  dependencies = c(needs, ("all")),�[0m
    2025-07-13T16:40:23.5262225Z �[36;1m  lib = NULL�[0m
    2025-07-13T16:40:23.5262497Z �[36;1m)�[0m
    2<details><summary>Toggle me!</summary>025-07-13T16:40:23.5262754Z �[36;1mcat("::endgroup::\n")�[0m
    2025-07-13T16:40:23.5263116Z �[36;1mcat("::group::Show Lockfile\n")�[0m
    2025-07-13T16:40:23.5263854Z �[36;1mwriteLines(readLines(".github/pkg.lock"))�[0m
    2025-07-13T16:40:23.5264292Z �[36;1mcat("::endgroup::\n")�[0m
    2025-07-13T16:40:23.5270156Z shell: C:\R\bin\Rscript.EXE {0}
    2025-07-13T16:40:23.5270504Z env:
    2025-07-13T16:40:23.5270994Z   R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
    2025-07-13T16:40:23.5271425Z   _R_CHECK_FORCE_SUGGESTS_: false
    2025-07-13T16:40:23.5271797Z   _R_CHECK_CRAN_INCOMING_REMOTE_: false
    2025-07-13T16:40:23.5272412Z   GITHUB_PAT: ***
    2025-07-13T16:40:23.5272707Z   MAKEFLAGS: -j 2
    2025-07-13T16:40:23.5272989Z   _R_INSTALL_TIME_PATCHES_: no
    2025-07-13T16:40:23.5273331Z   R_LIBS_USER: D:\a\_temp\Library
    2025-07-13T16:40:23.5273653Z   TZ: UTC
    2025-07-13T16:40:23.5273905Z   _R_CHECK_SYSTEM_CLOCK_: FALSE
    2025-07-13T16:40:23.5274220Z   NOT_CRAN: true
    2025-07-13T16:40:23.5274592Z   RSPM: https://packagemanager.posit.co/cran/latest
    2025-07-13T16:40:23.5275246Z   RENV_CONFIG_REPOS_OVERRIDE: https://packagemanager.posit.co/cran/latest
    2025-07-13T16:40:23.5275845Z   R_LIBS_SITE: C:/R/site-library
    2025-07-13T16:40:23.5276227Z   R_LIB_FOR_PAK: C:/R/site-library
    2025-07-13T16:40:23.5276575Z ##[endgroup]
    2025-07-13T16:40:23.6763698Z ##[group]Dependency resolution
    2025-07-13T16:40:24.7238032Z i Creating lockfile '.github/pkg.lock'
    2025-07-13T16:40:25.0892871Z 
    2025-07-13T16:40:26.3755230Z v Updated metadata database: 6.94 MB in 17 files.
    2025-07-13T16:40:26.3763063Z 
    2025-07-13T16:40:26.3980399Z i Creating lockfile '.github/pkg.lock'
    2025-07-13T16:40:26.3981248Z i Updating metadata database
    2025-07-13T16:40:42.9982489Z v Updating metadata database ... done
    2025-07-13T16:40:42.9990634Z 
    2025-07-13T16:40:45.7843611Z i Creating lockfile '.github/pkg.lock'
    2025-07-13T16:40:45.7844237Z x Creating lockfile '.github/pkg.lock' [21s]
    2025-07-13T16:40:45.7851709Z 
    2025-07-13T16:40:47.2946091Z Error: 
    2025-07-13T16:40:47.2946515Z ! error in pak subprocess
    2025-07-13T16:40:47.2947409Z Caused by error: 
    2025-07-13T16:40:47.2947789Z ! Could not solve package dependencies:
    2025-07-13T16:40:47.2948542Z * deps::.: Can't install dependency testthat (>= 3.0.0)
    2025-07-13T16:40:47.2950021Z * testthat:
    2025-07-13T16:40:47.2950472Z   * Can't install dependency cli (>= 3.6.1) (>= 1.0.1) (>= 1.7.5)
    2025-07-13T16:40:47.2951543Z   * Can't install dependency evaluate (>= 1.0.1) (>= 1.7.5)
    2025-07-13T16:40:47.2953021Z   * Can't install dependency ps (>= 1.7.5)
    2025-07-13T16:40:47.2953522Z * cli: cli conflicts with cli, to be installed
    2025-07-13T16:40:47.2954163Z * evaluate: evaluate conflicts with evaluate, to be installed
    2025-07-13T16:40:47.2954690Z * ps: ps conflicts with ps, to be installed
    2025-07-13T16:40:47.2955199Z * any::sessioninfo: dependency conflict
    2025-07-13T16:40:47.2955624Z * any::remotes: dependency conflict
    2025-07-13T16:40:47.2956024Z * any::rcmdcheck: dependency conflict
    2025-07-13T16:40:47.2956421Z * any::spelling: dependency conflict
    2025-07-13T16:40:47.2956725Z ---
    2025-07-13T16:40:47.2956949Z Backtrace:
    2025-07-13T16:40:47.2957464Z 1. pak::lockfile_create(c(deps, extra_deps), lockfile = ".github/pkg.lock",...
    2025-07-13T16:40:47.2958084Z 2. pak:::remote(function(...) { ...
    2025-07-13T16:40:47.2958405Z 3. err$throw(res$error)
    2025-07-13T16:40:47.2958653Z ---
    2025-07-13T16:40:47.2958897Z Subprocess backtrace:
    2025-07-13T16:40:47.2959377Z 1. base::withCallingHandlers(cli_message = function(msg) { ...
    2025-07-13T16:40:47.2960012Z 2. get("lockfile_create_internal", asNamespace("pak"))(...)
    2025-07-13T16:40:47.2960492Z 3. prop$stop_for_solution_error()
    2025-07-13T16:40:47.2960880Z 4. private$plan$stop_for_solve_error()
    2025-07-13T16:40:47.2961404Z 5. pkgdepends:::pkgplan_stop_for_solve_error(self, private)
    2025-07-13T16:40:47.2962091Z 6. base::throw(new_error("Could not solve package dependencies:\n", msg, ...
    2025-07-13T16:40:47.2962648Z 7. | base::signalCondition(cond)
    2025-07-13T16:40:47.2963002Z 8. global (function (e) ...
    2025-07-13T16:40:47.2963310Z Execution halted
    2025-07-13T16:40:47.3693761Z ##[error]Process completed with exit code 1.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked by an issue elsewherebugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions