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

load_all() removes methods provided by downstream packages without a warning #163

Closed
krlmlr opened this issue Jun 5, 2021 · 4 comments · Fixed by #164
Closed

load_all() removes methods provided by downstream packages without a warning #163

krlmlr opened this issue Jun 5, 2021 · 4 comments · Fixed by #164

Comments

@krlmlr
Copy link
Member

krlmlr commented Jun 5, 2021

pkgload::load_all("~/git/R/pillar")
#> ℹ Loading pillar
tbl_sum(tibble::tibble(a = 1))
#> A tibble 
#>  "1 x 1"
pkgload::load_all("~/git/R/pillar")
#> ℹ Loading pillar
tbl_sum(tibble::tibble(a = 1))
#> A data frame 
#>      "1 × 1"

Created on 2021-06-05 by the reprex package (v2.0.0)

tbl_sum.tbl_df() is provided by the tibble package, tbl_sum.tbl() is provided by pillar. It looks like the second load_all() somehow invaldiates the method registration. This happens on Ubuntu and on macOS M1.

@krlmlr krlmlr changed the title Weird issue with pillar with R 4.1 (?) load_all() removes methods provided by downstream packages without a warning Jun 9, 2021
@krlmlr
Copy link
Member Author

krlmlr commented Jun 9, 2021

This also happens in R 3.6 and R 4.0. Earlier versions of pkgload issue a warning, with v1.1.0 (63d383c) I see:

unloadNamespace("pillar") not successful, probably because another loaded package depends on it. Forcing unload. If you encounter problems, please restart R.

Even if we can't fix the problem, restoring the warning would be very nice.

@krlmlr
Copy link
Member Author

krlmlr commented Jun 9, 2021

Downstream issue: r-lib/pillar#330.

@jimhester
Copy link
Member

This warning was removed in #145, you can see there the reasons it was removed.

@krlmlr
Copy link
Member Author

krlmlr commented Jun 9, 2021

Thanks. Let's fix the problem then.

Should load_all() perhaps copy registration info for methods provided by other 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 a pull request may close this issue.

2 participants