r-lib / remotes

Install R packages from GitHub, GitLab, Bitbucket, git, svn repositories, URLs
https://remotes.r-lib.org/
Other
336 stars 153 forks source link

Multiple private git repo dependencies got error #597

Closed niheaven closed 3 years ago

niheaven commented 3 years ago

When I develop some package that depends on multiple other packages that live on private repo, I got some error that remotes::install_deps() only install last one and omit others.

I use the following to add deps:

usethis::use_dev_package("a", remote = "git::http://private.repo/git/a.git")
usethis::use_dev_package("b", remote = "git::http://private.repo/git/b.git")

And the DESCRIPTION likes:

Imports:
    a,
    b
Remotes:
    git::http://private.repo/git/a.git,
    git::http://private.repo/git/b.git

But when I try to install_deps and actually install the developed package, R only install dep package b, twice 😭

install_deps()
# Skipping 2 packages not available: a, b
# Downloading git repo http://private.repo/git/b.git
# xxxxxxxxxxx
# Downloading git repo http://private.repo/git/b.git
# xxxxxxxxxxx

What's wrong? Or is it a bug?

jennybc commented 3 years ago

This feels like an issue that belongs on the remotes package. Unless usethis is writing incorrectly to DESCRIPTION. But that doesn't seem to be the case.

It could also be a usage problem, i.e. this is mis-specified "git::http://private.repo/git/b.git".

niheaven commented 3 years ago

When there is only one private repo, install_deps works well. So maybe syntax is correct, I thought.

I try to figure out related code that may cause this error, but it jumps in and out too many packages and C code. So I really need developer's help😓