r-lib / pkgdepends

R Package Dependency Resolution
https://r-lib.github.io/pkgdepends/
Other
102 stars 30 forks source link

Use shorter paths, warn for long paths on win #236

Closed gaborcsardi closed 3 years ago

gaborcsardi commented 3 years ago

We use shorter paths now, they are practically as short as possible using the proper R temporary directory. We also detect paths that are too long, and warn for them.

For the record, we cannot currently use a junction with a shorter path, because pkgbuild calls normalizePath() on the package directory path, and this resolves junctions. But it also does not make too much sense to use them, since they cannot be much shorter than the current paths.

Creating a drive for the path would make it the shortest possible, but this is rather messy to do programmatically. We would need to look for the existing drives to choose a letter, it would be easy to leave the drive behind on a crash, etc. So we are not doing this.

Closes https://github.com/r-lib/pak/issues/252