pak
pak copied to clipboard
Subdir install from GH fails
❯ pak::pkg_install("SparkR=github::apache/spark/R/[email protected]?reinstall")
→ Will install 1 package.
→ The package (0 B) is cached.
+ SparkR 3.1.2 👷🏽♀️🔧 (GitHub: de351e3)
ℹ No downloads are needed, 1 pkg is cached
ℹ Packaging SparkR 3.1.2
Error: No root directory found in /private/var/folders/ph/fpcmzfd16rgbbk8mxvy9m2_h0000gn/T/RtmpK2CrNI/X/SparkR or its parent directories. Root criterion: contains a file "DESCRIPTION"
Type .Last.error.trace to see where the error occurred
Any updates on this one? The documentation claims it should be working to install packages from github subdirectories but i cant get it working here. ☹
This is now fixed in pkgdepends: https://github.com/r-lib/pkgdepends/pull/290
This indeed works for me now:
pak::pak_update(stream = "devel", force = TRUE)
pak::pkg_install("SparkR=github::apache/spark/R/[email protected]?reinstall")
Btw. this is a duplicate of https://github.com/r-lib/pak/issues/385
Oddly enough, this doesn't seem to work for me....... (If I do this, pak will shut up)
renv::install()
works, though.
> pak::pkg_install("apache/arrow-nanoarrow/r")
^C
> renv::install("apache/arrow-nanoarrow/r")
Retrieving 'https://api.github.com/repos/apache/arrow-nanoarrow/tarball/da7b5ecc108848e538a2b2592315d0fcf0b12786' ...
OK [downloaded 179.7 Kb in 0.9 secs]
Installing nanoarrow [0.0.0.9000] ...
OK [built from source]
Copying nanoarrow [0.0.0.9000] into the cache ...
OK [copied to cache in 23 milliseconds]
> pak::pak("nanoarrow=github::apache/arrow-nanoarrow/r")
^C
> packageVersion("pak")
[1] ‘0.3.1.9999’
Did you install the latest version? E.g.
❯ pak::pak_update(stream = "devel")
trying URL 'https://r-lib.github.io/p/pak/devel/darwin20/aarch64/pak_0.3.1.9999_R-4-2_aarch64-darwin20.tgz'
Content type 'application/octet-stream' length 5459001 bytes (5.2 MB)
==================================================
downloaded 5.2 MB
Updating to version 0.3.1.9999 (2023-01-13 05:44:48 UTC)
* installing *binary* package ‘pak’ ...
* DONE (pak)
Reloading pak.
❯ pak::pkg_install("apache/arrow-nanoarrow/r")
→ Will update 1 package.
→ Will download 1 package with unknown size.
+ nanoarrow 0.0.0.9000 → 0.0.0.9000 👷♂️🔧 ⬇ (GitHub: da7b5ec)
? Do you want to continue (Y/n)
ℹ Getting 1 pkg with unknown size
✔ Got nanoarrow 0.0.0.9000 (source) (294.59 kB)
✔ Downloaded 1 package (294.59 kB)in 1.1s
ℹ Packaging nanoarrow 0.0.0.9000
✔ Packaged nanoarrow 0.0.0.9000 (2.9s)
ℹ Building nanoarrow 0.0.0.9000
✔ Built nanoarrow 0.0.0.9000 (4.5s)
✔ Installed nanoarrow 0.0.0.9000 (github::apache/arrow-nanoarrow@da7b5ec) (23ms)
✔ 1 pkg: upd 1, dld 1 (NA B) [15.1s]
Sorry, this may be a completely different issue, I typed the command in VSCode's integrated terminal and found that if I reload the VSCode screen while pak is stopped, the installation completes during that time.
> pak::pkg_install("apache/arrow-nanoarrow/r")
! Using bundled GitHub PAT. Please add your own PAT using `gitcreds::gitcreds_set()`.
→ Will install 1 package.
→ Will download 1 package with unknown size.
+ nanoarrow 0.0.0.9000 [bld][cmp][dl] (GitHub: da7b5ec)
ℹ Getting 1 pkg with unknown size
✔ Got nanoarrow 0.0.0.9000 (source) (294.59 kB)
✔ Downloaded 1 package (294.59 kB)in 2.5s
ℹ Packaging nanoarrow 0.0.0.9000
✔ Packaged nanoarrow 0.0.0.9000 (1.1s)
ℹ Building nanoarrow 0.0.0.9000
✔ Built nanoarrow 0.0.0.9000 (10.3s)
✔ Installed nanoarrow 0.0.0.9000 (github::apache/arrow-nanoarrow@da7b5ec) (49ms)
✔ 1 pkg: added 1, dld 1 (NA B) [1m 27.8s]
I also found that this always happens when installing from GitHub, regardless of subdirectories...
Is this affected by some environment variable in the VSCode terminal, since this also occurs in R started with R --vanilla
?
I have no idea......
In any case, this is a completely different issue and will open another issue if it is reproducible. Thanks for your help.