holepunch icon indicating copy to clipboard operation
holepunch copied to clipboard

Drop github dependencies under remotes

Open karthik opened this issue 5 years ago • 12 comments

Currently write_compendium_description writes all dependencies together. It would be more useful to separate out remotes and imports.

karthik avatar Aug 14 '19 21:08 karthik

Hi @karthik, I've just encountered an issue like this. My DESCRIPTION file includes a couple of remotes. I had to add these by hand because they were simply included under Depends.

Depends: 
    dplyr,
    forcats,
    gganimate,
    ggplot2,
    here,
    janitor,
    lubridate,
    readr,
    scales,
    scico,
    stringr,
    tidyr,
    tidyverse
Remotes: thomasp85/patchwork,
  hrbrmstr/pluralize

However, these remotes don't seem to be added to the Docker image.

Also, if I do write_install() then they are simply listed as install.packages() entries.

Would be great to get this sorted out.

Otherwise, this is a very magical package indeed. Thank you!

Best regards, Andrew.

datawookie avatar Aug 15 '19 06:08 datawookie

Thanks Andrew! Yes Im aware of these issues and am sorting them out.

karthik avatar Aug 15 '19 17:08 karthik

@datawookie Thanks for this issue. I've added this feature in the most recent update. Can you give this a spin and let me know if you run into issues? thanks!

karthik avatar Aug 20 '19 03:08 karthik

@karthik I've just tried that out on my repository and it still does not include those remote libraries. You can take a look at my project here.

datawookie avatar Aug 20 '19 10:08 datawookie

Thank you for sharing your repo. You helped me uncover a new bug that I'm working through now.

karthik avatar Aug 20 '19 15:08 karthik

No problem. Very happy to help with debugging this. Excited to get it working.

datawookie avatar Aug 20 '19 15:08 datawookie

ok @datawookie! I have an update. Try this code:

cd /tmp
git clone https://github.com/datawookie/tidytuesday.git
cd tidytuesday
# Launch R
# Make sure you have a recent version of holepunch
x <- holepunch::get_dependencies(".")
rem <- lapply(x, remotes:::package2remote)
rem[[which(x == "pluralize")]]

Do you see option A

$host
[1] "api.github.com"

$package
NULL

$repo
[1] "pluralize"

$subdir
NULL

$username
[1] "hrbrmstr"

$ref
[1] "master"

$sha
[1] "1c24cd1761d2d57214c2aaeeb234c2c9b7aeba75"

$auth_token
NULL

attr(,"class")
[1] "github_remote" "remote"

or Option B?

$name
[1] "pluralize"

$repos
                      CRAN 
"https://cran.rstudio.com" 

$pkg_type
[1] "both"

$sha
[1] "0.1.0"

attr(,"class")
[1] "cran_remote" "remote"     

I am seeing A on a fresh clone. But earlier I saw B, which made it hard to detect that it was a GitHub only package. On further experimentation I am seeing B when I clone hrbrmstr/pluralize locally and install instead of using remotes::install_github. Does this also happen with you?

karthik avatar Sep 03 '19 18:09 karthik

Hi @karthik,

Glad to know that this is moving forward!

I just followed your directions and ended up with Option A. Can I assume that this was what you were hoping for? :)

Best regards, Andrew.

datawookie avatar Sep 04 '19 04:09 datawookie

That's right! In that case I will call this issue resolved. Thanks for your help 😄

karthik avatar Sep 04 '19 17:09 karthik

@karthik has this fix been merged into master yet? Reason I ask is that I've just tried rebuilding but still have same issues.

datawookie avatar Sep 05 '19 02:09 datawookie

It works for me on version 0.1.25.9000 which is current master.

karthik avatar Sep 06 '19 00:09 karthik

A screencast of how it works for me locally: asciicast

karthik avatar Sep 06 '19 00:09 karthik