r-lib / pak

A fresh approach to package installation
https://pak.r-lib.org
671 stars 60 forks source link

Messaging around `local_install()` is confusing #665

Open jennybc opened 2 months ago

jennybc commented 2 months ago

We've got Ctrl/Cmd + Shift + B in Positron wired up to pak::local_install(upgrade = FALSE) right now, so I'm using it alot and have had ample time to stare at its messaging. I would really like to keep using pak for this or at least make it one of two pre-configured options (see further discussion at https://github.com/posit-dev/positron/issues/2955), because I really like what upgrade = FALSE does (more background in https://github.com/posit-dev/positron/issues/1631 and https://github.com/posit-dev/positron/issues/1732).

> pak::local_install(upgrade = FALSE)
✔ Updated metadata database: 4.28 MB in 4 files.
✔ Updating metadata database ... done

→ Will update 1 package.
→ The package (0 B) is cached.
+ usethis 2.2.3.9000 → 2.2.3.9000 👷🏿‍♂️
ℹ No downloads are needed, 1 pkg is cached
✔ Got usethis 2.2.3.9000 (source) (96 B)
ℹ Packaging usethis 2.2.3.9000
✔ Packaged usethis 2.2.3.9000 (4.2s)
ℹ Building usethis 2.2.3.9000
✔ Built usethis 2.2.3.9000 (2.6s)
✔ Installed usethis 2.2.3.9000 (local) (44ms)
✔ 1 pkg + 30 deps: kept 28, upd 1, dld 1 (NA B) [20.6s]

A few aspects of this seem weird to me, given that I'm installing from local source.

ℹ No downloads are needed, 1 pkg is cached

Somehow this makes me feel like pak is going to use some previously-downloaded-and-cached version of usethis, instead of local source. I do understand that is not what's happening, but the message has made me think about it.

✔ 1 pkg + 30 deps: kept 28, upd 1, dld 1 (NA B) [20.6s]

This line also seems a bit misleading. I assume usethis is the "1 pkg" and not considered part of the "30 deps". But then ... is it the 1 package that was ?updated? and ?downloaded? in the "kept 28, upd 1, dld 1" part 🤔