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

Pipeline fails with <simpleError: Cannot install packages: .... values must be length 1, but FUN(X[[1]]) result is length 0> #329

Closed
kapsner opened this issue Sep 6, 2022 · 4 comments

Comments

@kapsner
Copy link
Contributor

kapsner commented Sep 6, 2022

For some reason, I lately experience some issues with running github actions with the tic-workflow.

The pipelines for some of my packages (DQAstats, DQAgui, miRacumDQA) fail all with the same issue that occurs when running tic::install:
<simpleError: Cannot install packages: .... values must be length 1, but FUN(X[[1]]) result is length 0>

I tried to run tic::install() locally, which results in the very same error, however, I was unable to break down the issue to its origin:

tic::install()
#> [32mℹ[39m Using existing tic stage configuration, use [90m`force = TRUE`[39m to reload
#> ℹ [36mRunning stage 'install': [90mstep_install_deps(dependencies=TRUE)[36m[39m
#> 
#> [34m<callr_error/rlib_error_3_0/rlib_error/error>[39m
#> [1m[33mError[39m[22m: 
#> [33m![39m error in callr subprocess
#> [1mCaused by error[22m: 
#> [33m![39m Cannot install packages:
#> * [1mdeps::/home/user/development/Rpackages/dqa/dqastats[22m: values must be length 1,
#>  but FUN(X[[1]]) result is length 0
#> ---
#> Subprocess backtrace:
#> [90m 1. [39mbase::withCallingHandlers(cli_message = function(msg) { …
#> [90m 2. [39m[1mget[22m[38;2;255;121;198m([38;2;241;250;140m"local_install_dev_deps_make_plan"[39m, [1masNamespace[22m[33m([39m[38;2;241;250;140m"pak"[39m[33m)[39m[38;2;255;121;198m)([39m...[38;2;255;121;198m)[39m
#> [90m 3. [39mprop[38;2;189;147;249m$[39m[1mstop_for_solution_error[22m[38;2;255;121;198m()[39m
#> [90m 4. [39mprivate[38;2;189;147;249m$[39mplan[38;2;189;147;249m$[39m[1mstop_for_solve_error[22m[38;2;255;121;198m()[39m
#> [90m 5. [39mpkgdepends:::[1mpkgplan_stop_for_solve_error[22m[38;2;255;121;198m([39mself, private[38;2;255;121;198m)[39m
#> [90m 6. [39mbase::[1mstop[22m[38;2;255;121;198m([38;2;241;250;140m"Cannot install packages:\n"[39m, msg, call. = [38;2;189;147;249mFALSE[38;2;255;121;198m)[39m
#> [90m 7. | base::.handleSimpleError(function (e) …[39m
#> [90m 8. [39mglobal [1mh[22m[38;2;255;121;198m([39m[1msimpleError[22m[33m([39mmsg, call[33m)[39m[38;2;255;121;198m)[39m
#> [90m 9. [39mbase::[1mstop[22m[38;2;255;121;198m([39me[38;2;255;121;198m)[39m
#> [90m10. [39mglobal (function (e) …
#> <simpleError: Cannot install packages:
#> * [1mdeps::/home/user/development/Rpackages/dqa/dqastats[22m: values must be length 1,
#>  but FUN(X[[1]]) result is length 0>
#> NULL
#> [1m[33mError[39m[22m: 
#> [33m![39m error in callr subprocess
#> [1mCaused by error[22m: 
#> [33m![39m Cannot install packages:
#> * [1mdeps::/home/user/development/Rpackages/dqa/dqastats[22m: values must be length 1,
#>  but FUN(X[[1]]) result is length 0
#> [90mType .Last.error to see the more details.[39m
#> Error: A step failed in stage "install": install.

Any help to resolve this would be highly appreciated! Thanks in advance.

@kapsner
Copy link
Contributor Author

kapsner commented Sep 6, 2022

Ok, the error occurs here: https://github.com/ropensci/tic/blob/main/R/steps-install.R#L20 when running pak::local_install_dev_deps but I do not understand why...

@pat-s
Copy link
Member

pat-s commented Sep 6, 2022

It might be most likely caused by https://github.com/miracum/dqa-dqastats/blob/025d3b942ccd8e1cb5ce1c407e915cfe06825a4e/DESCRIPTION#L41-L42 which {pak} fails to resolve.

Can you reproduce it locally when running pak::local_install_dev_deps() from the project root? (make sure to remove this dependency beforehand)

@kapsner
Copy link
Contributor Author

kapsner commented Sep 6, 2022

Hi @pat-s , thanks for your quick answer.

You are right - when replacing the remotes url with the github-version, pak::local_install_dev_deps() runs successfully and the tic-workflow works again! (https://github.com/miracum/dqa-dqastats/runs/8203757707?check_suite_focus=true)

So it seems as if the issue is rather related to pak / its dependency pkgdepends as this package does not seem to support all valid formatings of the remotes-section of the description file... (https://cran.r-project.org/web/packages/devtools/vignettes/dependencies.html#other-sources)

@pat-s
Copy link
Member

pat-s commented Sep 6, 2022

Glad this helped! Jep it might be worth reporting this to pal directly and linking this issue 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants