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

check_win_*: accept a path to *.tar.gz #2588

Open
MLopez-Ibanez opened this issue Nov 25, 2024 · 2 comments
Open

check_win_*: accept a path to *.tar.gz #2588

MLopez-Ibanez opened this issue Nov 25, 2024 · 2 comments
Labels
feature a feature request or enhancement

Comments

@MLopez-Ibanez
Copy link

Building my package is not trivial so it would be great if check_win_* functions accepted already built *.tar.gz packages and avoided rebuilding them. The documentation gives the impression that this should be possible "pkg: The package to use, can be a file path to the package or a package object." but only the path to the source directory of the package is accepted.

@jennybc
Copy link
Member

jennybc commented Nov 25, 2024

Well, the "package object" here:

The package to use, can be a file path to the package or a package object.

is referring to an actual S3 class used (mostly) internally inside devtools.

x <- devtools::as.package("~/rrr/devtools")
class(x)
#> [1] "package"
str(x, list.len = 5)
#> List of 20
#>  $ package                : chr "devtools"
#>  $ title                  : chr "Tools to Make Developing R Packages Easier"
#>  $ version                : chr "2.4.5.9000"
#>  $ authors@r              : chr "c(\nperson(\"Hadley\", \"Wickham\", role = \"aut\"),\nperson(\"Jim\", \"Hester\", role = \"aut\"),\nperson(\"Wi"| __truncated__
#>  $ description            : chr "Collection of package development tools."
#>   [list output truncated]
#>  - attr(*, "class")= chr "package"

It's not referring to a *.tar.gz.

I too have felt a related need (#2485), so I do understand where you're coming from.

But I also think, whenever possible, it's worth asking "why does it take so long to build my package?" and seeing if there are other measures you can take to give yourself a smoother dev experience.

What is taking so long? Meaning: is it compilation, super slow vignettes, etc.

@MLopez-Ibanez
Copy link
Author

What is taking so long? Meaning: is it compilation, super slow vignettes, etc.

The time is not the issue. I further compress the PDF vignette after creating the *.tar.gz because R CMD build does not go far enough.

You can see the script I am using here: https://github.com/MLopez-Ibanez/irace/blob/master/scripts/recompact.sh

It is not inserting a new vignette. It is just replacing the vignette PDF with one that is compressed as much as it is possible.

It seems to work fine in CRAN. Yes I cannot use devtools to submit, but the alternative is that CRAN complains that my vignettes are too large, which is even more painful. If devtools could do what my script does, then I'll happily get rid of my script and use devtools to submit.

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

No branches or pull requests

2 participants