Can't restore project if some packages available only as a "source" and some only as a "binary"
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 409
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
Hi Guys,
I'm still working on migration of our current project to packrat package manager. On Linux and MacOSx everything works fine, but I've been stuck on Windows.
Let A be a dependency available only and only in "binary" form for Windows (eg. RCurl - it is almost impossible to get complete toolchain to compile RCurl for std R developer/researcher on Windows machine)
Let B be a dependency available only and only in "source" form for Windows (eg. our private packages)
A and B are both compilable on Linux and MacOS.
Now assume that you are on Windows. If you set options(pkgType = "source") then packrat::restore() fails on A (can't compile). And if you set options(pkgType = "win.binary") then packrat::restore() fails on B (binary not found).
This is potential issue for many other developers and I think it should be handled somehow.
It is possible to set standard R option ( options(pkgType="...") ) to define the way how packages should be installed (and packrat now respects it) but I suggest to add another packrat-related option (eg. packrat::set_opts(pkgType.fallback=c("source", "binary", ... )) defining fallback pkgTypes used in case the default one does not work. So the workflow should be as following
- try to download using default option set in
options(pkgType..) - try first fallback option if not used already (so if default option is "source" and first fallback option is also "source", skip it and confinue with second fallback option if defined) and if available for current platform (eg. don't try to use mac.binary on windows workstations)
- try second fallback option ....
- if the package still can't be installed, fail
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the packrat::restore() package-installation flow and how it respects options(pkgType). Compare that behavior with the proposed packrat::set_opts(pkgType.fallback=...) workflow; done means Windows restoration can try compatible source and binary package types in order and still fail clearly when none work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100