-
Notifications
You must be signed in to change notification settings - Fork 153
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
package dependency installation for subdirectories in GIT #777
Comments
I am afraid that there is no way to do that currently. |
For what it's worth, in Is this something that |
It is unlikely that we would implement this in remotes, but we could implement it in pak. |
Hi @gaborcsardi thanks for sharing that sub-directories are currently not supported by |
I am sorry, I am not sure what you mean. |
Regarding my upper question you stated, that it is currently not possible to add a sub-directory GIT sources to the
would help solving the issue? |
As we are focusing on pak, we are not adding new features to remotes, so it is unlikely.
You could use pak instead of remotes as it is mostly superior to remotes. |
Thanks @gaborcsardi. As I used used Error:
! error in pak subprocess
Caused by error:
! Could not solve package dependencies:
* git::https://dev.azure.com/<company>/<department>/_git/<package>:
* Can't install dependency <package dep 1> (>= 0.1.3) (>= 0.0.3) (>= 0.0.2)
* Can't install dependency <package dep 2> (>= 0.0.3) (>= 0.0.2)
* Can't install dependency <package dep 3> (>= 0.0.2)
* <package dep 1>: Can't find package called <package dep 1>, <package dep 2>, <package dep 3>, <package dep 4>.
* <package dep 2>: Can't find package called <package dep 1>, <package dep 2>, <package dep 3>, <package dep 4>.
* <package dep 3>: Can't find package called <package dep 1>, <package dep 2>, <package dep 3>, <package dep 4>.
---
Backtrace:
1. pak::pkg_install("git::https://dev.azure.com/<company>/<department>/_git/<package>?reinstall")
2. pak:::remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), …
3. err$throw(res$error)
---
Subprocess backtrace:
1. base::withCallingHandlers(cli_message = function(msg) { …
2. get("pkg_install_make_plan", asNamespace("pak"))(...)
3. prop$stop_for_solution_error()
4. private$plan$stop_for_solve_error()
5. pkgdepends:::pkgplan_stop_for_solve_error(self, private)
6. base::throw(new_error("Could not solve package dependencies:\n", msg, …
7. | base::signalCondition(cond)
8. global (function (e) … what I still don't get is the link between the > sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.utf8 LC_CTYPE=German_Germany.utf8 LC_MONETARY=German_Germany.utf8 LC_NUMERIC=C
[5] LC_TIME=German_Germany.utf8
time zone: UTC
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_2.4.5 usethis_2.2.2
loaded via a namespace (and not attached):
[1] miniUI_0.1.1.1 renv_1.0.3 compiler_4.3.2 crayon_1.5.2 promises_1.2.1 Rcpp_1.0.11 stringr_1.5.0
[8] callr_3.7.3 later_1.3.1 fastmap_1.1.1 mime_0.12 R6_2.5.1 pak_0.6.0.9001 htmlwidgets_1.6.2
[15] profvis_0.3.8 shiny_1.7.5.1 rlang_1.1.2 cachem_1.0.8 stringi_1.7.12 httpuv_1.6.12 fs_1.6.3
[22] pkgload_1.3.3 memoise_2.0.1 cli_3.6.1 magrittr_2.0.3 ps_1.7.5 digest_0.6.33 processx_3.8.2
[29] rstudioapi_0.15.0 xtable_1.8-4 remotes_2.4.2.1 lifecycle_1.0.4 prettyunits_1.1.1 vctrs_0.6.4 glue_1.6.2
[36] urlchecker_1.0.1 sessioninfo_1.2.2 pkgbuild_1.4.2 purrr_1.0.1 tools_4.3.2 ellipsis_0.3.2 htmltools_0.5.5 |
Yes: https://pak.r-lib.org/reference/pak_package_sources.html#the-remotes-field
Hard to say without seeing your |
Thanks for sharing! I have currently 2 repos each containing exactly one package. Let's say:
Package: pkgB
Title: foo
Version: 0.0.6
Authors@R:
Description: foo.
License: file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Imports:
pkgA (>= 0.1.3),
dplyr (>= 1.1.2),
glue (>= 1.6.2),
lubridate (>= 1.9.2),
purrr (>= 1.0.1),
RPostgres (>= 1.4.5),
stringr (>= 1.5.0),
tidyr (>= 1.3.0)
Remotes:
git::https://dev.azure.com/<company>/<department>/_git/pkgA
|
Yes, AFAICT that should work, provided that you have the credentials to access these repositories in the git credential store, and you are not running into this bug: r-lib/pkgdepends#319 |
Ok thanks. As I have successfully installed |
I have some R packages in my companies repo. But they are not in the root path but in a subdirectory. I can easly install this packages using the
subdir
argument inremotes::install_git
. However I do not know how to correctly specify the sub-directory in theRemotes
section of theDESCRIPTION
file.All works find if each package is in one corresponding git repos using :
but if I use something like
to address that the package lives in a subdir of a repo I get an error:
I did consult this link however it is not clear to me how to specify the git subdirectory .
The text was updated successfully, but these errors were encountered: