Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Enable install_version to install current version of package on Windows/macOS #1730
Motivation and summary
Because of the impending API change in the package git2r, I want to write documentation that advises users to install version 0.21.0 of git2r, which is still the current version of CRAN. This doesn't work with the current version of
I read about the diaspora. However, I still decided to send the PR here because unlike packages like pkgbuild and usethis, remotes is not yet a dependency for devtools. Also,
Edit: I investigated more. The implementation of
On macOS (tested on 10.10.5 and 10.10.13) and Windows (tested on 10),
When installing the current version,
On the Windows and macOS machines I tested,
I confirmed that this solution works on macOS, Windows, and Linux.
If this PR is useful, I can add a bullet point to
@jimhester Also, regarding my observation that
I wasn't able to find an easy fix like I did for here, and there has been recent development about how to handle binary packages (e.g. the most recent commit). Thus I wasn't sure how best to proceed. I think it could be solved by checking
Not sure what the best solution is; the current plan is to eventually switch devtools to use pkgman, which uses a different API and method for package installation, so devtools will likely never use remotes as-is.
However you are still welcome to open an issue there if you want to try and fix binary installation; in general you are somewhat limited in what binary versions are available, as CRAN only builds the most recent version of a package for a given version of R.
@jimhester Good to know! I didn't realize that was the plan.
@gaborcsardi Thanks for the advice! I agree this is an edge case. This PR to devtools solves the main problem I was having, so I am fine with remotes keeping its current behavior of always installing from source.
Instead of changing the behavior of
If a user specifies
If a user specifies
If you're interested, I could send a PR that 1) notes in the documentation that