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

new function uninstall, forwards to remove.packages #820

Merged
merged 6 commits into from May 29, 2015

Conversation

Projects
None yet
2 participants
@krlmlr
Member

krlmlr commented May 28, 2015

Use case: Easy uninstall for one-off packages that are installed for testing purposes.

Closes #817 (=includes it).

pkg <- as.package(pkg)
if (unload && pkg$package %in% loaded_packages()$package) unload(pkg)

This comment has been minimized.

@hadley

hadley May 28, 2015

Member

Can you put unload() on a new line please? (And similarly below)

@hadley

This comment has been minimized.

Member

hadley commented May 28, 2015

Looks good - could you add a bullet to NEWS (and maybe a unit test?)

@krlmlr

This comment has been minimized.

Member

krlmlr commented May 28, 2015

Done. Contains two unrelated code quality improvements in install.r and test-dll.r, hope it's ok.

test_that("uninstall() unloads and removes from library", {
# Make a temp lib directory to install test package into
old_libpaths <- .libPaths()

This comment has been minimized.

@hadley

hadley May 29, 2015

Member

I wonder if it would be useful to pull this out into with_temp_lib or something?

This comment has been minimized.

@krlmlr

krlmlr May 29, 2015

Member

Agreed, but let's not clutter this pull request even more.

@krlmlr krlmlr referenced this pull request May 29, 2015

Closed

with_temp_lib() #826

3 of 3 tasks complete

@hadley hadley merged commit 957b09a into r-lib:master May 29, 2015

1 check passed

coverage/coveralls Coverage increased (+0.46%) to 33.98%
Details
@hadley

This comment has been minimized.

Member

hadley commented May 29, 2015

Thanks!

@krlmlr krlmlr deleted the krlmlr:uninstall branch Jun 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment