pak
pak copied to clipboard
Magic `pak()` function
- Only works interactively.
- Automatically detects if you are developing a package / project / etc.
- Shows the status of your library / package / project.
- Offers some actions to do, depending on the status.
- Has one argument, which is a ref or list of refs, to install or update and/or add to the package.
If the current directory is not in a package
Status:
- pak version, whether there is an update (?).
- Summary of libraries (?).
- Cache summary (?).
- Summary of main (first) library.
- Packages that can be updated in the main library.
Actions:
- Update all packages.
- List all packages.
If the current directory is in a package
- pak version, whether there is an update (?).
- Dependency tree of the package, first level only, annotated.
- Whether the local package is up to date in the main library.
- Dependencies that are missing from the main library.
- Dependencies that are outdated in the main library.
- Summary of "extra" packages, that are not needed for the local package.
- Potential version conflicts of dependencies.
Actions:
- Install/update package.
- Install/update dependencies.
- Install/update dev-dependencies.
I first though this magic pak function is a cli function that can be used like pip or npm. Is that on the roadmap?
I first though this magic pak function is a cli function that can be used like pip or npm. Is that on the roadmap?
@psolymos would love this feature as well.
@jimbrig Yeah, I agree. The difficulty is that R packages do not have a standard way to "install" executables, so we would need to work that out first.
The only thing that comes to mind for me would be to utilize the littler scripts as a form of executables (similar to how most people install R packages within Docker image builds) or an alternative via the docopt
package. But good point @gaborcsardi