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

Sustitute {callr} dependency #4

Closed
gaborcsardi opened this issue Aug 30, 2023 · 1 comment
Closed

Sustitute {callr} dependency #4

gaborcsardi opened this issue Aug 30, 2023 · 1 comment

Comments

@gaborcsardi
Copy link
Owner

To be looked at after #20. This simplifies the dependency graph of {cyclocomp} by removing 3 (heavy) recursive dependencies. This seems possible by leveraging other imported packages. The context of this is to remove these dependencies so {lintr} has a smaller dependency graph, in the light of lorenzwalthert/precommit#356.

library(magrittr)
setwd("~/git/cyclocomp/")
deps <- desc::desc_get_deps() %>%
  dplyr::filter(type == 'Imports') %>%
  dplyr::pull(package) %>%
  c("callr")
recursive_deps_before <- purrr::map(deps, ~names(renv:::renv_package_dependencies(.x))) %>%
  unlist() %>%
  unique()

print(recursive_deps_before)
#>  [1] "processx"  "R6"        "utils"     "callr"     "ps"        "graphics" 
#>  [7] "grDevices" "stats"     "crayon"    "methods"   "rprojroot" "desc"     
#> [13] "tools"     "remotes"   "withr"

deps_after <- desc::desc_get_deps() %>%
  dplyr::filter(type == 'Imports') %>%
  dplyr::pull(package) %>%
  setdiff('callr')


recursive_deps_after <- purrr::map(deps_after, ~names(renv:::renv_package_dependencies(.x))) %>%
  unlist() %>%
  unique()

print(recursive_deps_after)
#>  [1] "graphics"  "utils"     "grDevices" "stats"     "crayon"    "methods"  
#>  [7] "R6"        "rprojroot" "desc"      "tools"     "remotes"   "withr"
setdiff(recursive_deps_before, recursive_deps_after)
#> [1] "processx" "callr"    "ps"

Created on 2022-01-09 by the reprex package (v2.0.1)

cc: @MichaelChirico

@gaborcsardi
Copy link
Owner Author

@HAlexander23 It would be great if this PR is reviewed soon; packages upstream would really benefit from this change! Thanks.

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

1 participant