Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message before PACKAGES is constructed after removing packages #30

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JosiahParry
Copy link
Contributor

It could allay concerns to provide an informative message that the PACKAGES file needs to be rewritten after packages have been removed.

Related #29

Copy link
Member

@georgestagg georgestagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a similar message printed by tools::write_PACKAGES() whenever the PACKAGES file is reconstructed. The function is called from here:

rwasm/R/repo.R

Lines 280 to 284 in 32a757e

update_packages <- function(contrib_src, contrib_bin) {
tools::write_PACKAGES(contrib_src, verbose = TRUE)
tools::write_PACKAGES(contrib_bin, verbose = TRUE, type = "mac.binary")
invisible(NULL)
}

and the output looks something like the following, beginning with "Processing packages".

Processing packages:
  /private/tmp/nloptr/repo/bin/emscripten/contrib/4.3/lme4_1.1-35.2.tgz
  /private/tmp/nloptr/repo/bin/emscripten/contrib/4.3/nloptr_2.0.3.tgz
done

So, I think if we wanted to do this we'd need a few changes:

  1. Print our custom message in update_packages(), just before calling tools::write_PACKAGES().

  2. Expand our message to include more than "Processing packages" or "Reconstructing PACKAGES." We should explain what this actually means.

  3. Perhaps pass the verbose argument into the function (defaulting to TRUE, the output is generally useful) rather than just hard coding verbose = TRUE, so that we can easily squelch both our custom message and the verbose output from tools::write_PACKAGES().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants