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

[Bug]: modules crash if package not attached #786

Open
3 tasks done
chlebowa opened this issue Sep 23, 2024 · 4 comments
Open
3 tasks done

[Bug]: modules crash if package not attached #786

chlebowa opened this issue Sep 23, 2024 · 4 comments
Labels
bug Something isn't working core

Comments

@chlebowa
Copy link
Contributor

chlebowa commented Sep 23, 2024

What happened?

Unless the package is attached, at least some modules fail.
THIS IS A TWO-PART ISSUE

PART 1

teal.modules.general seems to rely on the magrittr pipe but does not re-export it.

teal_app <- teal::init(
  data = teal.data::teal_data(ADSL = teal.modules.general::rADSL),
  modules = teal::modules(teal.modules.general::tm_missing_data())
)
shiny::runApp(teal_app)

image

I suggest re-exporting the pipe operator OR replacing it with the native pipe.

PART 2

tm_missing_data (and possibly other modules) requires ggplot2 to be attached (ggplot function used without prefix) but does not enforce attaching, unless it is itself attached.

library(magrittr)
teal_app <- teal::init(
  data = teal.data::teal_data(ADSL = teal.modules.general::rADSL),
  modules = teal::modules(teal.modules.general::tm_missing_data())
)
shiny::runApp(teal_app)

image

sessionInfo()

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@chlebowa chlebowa added the bug Something isn't working label Sep 23, 2024
@chlebowa chlebowa changed the title [Bug]: <title>modules crash if package not attached [Bug]: modules crash if package not attached Sep 23, 2024
@gogonzo
Copy link
Contributor

gogonzo commented Sep 27, 2024

Makes sense. We removed re-export of the magrittrrecently so we should fix the modules now. @donyunardi

@chlebowa
Copy link
Contributor Author

I think the native pipe is safe to use now 👍

@gogonzo
Copy link
Contributor

gogonzo commented Sep 27, 2024

I think the native pipe is safe to use now 👍

I think it is, R 4.1 released in May 2021 (pipe where introduced then), it has been more than 3 years. Most of the systems have updated already (I hope so)

@chlebowa
Copy link
Contributor Author

After the .rds debacle many systems may be using R 4.4 already 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core
Projects
None yet
Development

No branches or pull requests

3 participants