-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Move shiny
to Imports
#529
Comments
With the current setup, we make sure that the I look around the code and it looks like we always use |
For exactly this reasons we already have |
I thought the intent was to allow it. |
Right. That was an inaccurate question.
|
@pawelru we will need to add |
No we won't, |
A test package https://github.com/m7pr/import_test https://github.com/m7pr/import_test/actions/runs/7639811026/job/20813626827#step:40:107 ❯ checking examples ... ERROR
Running examples in 'r.pkg.template-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: hello
> ### Title: Personal greeting
> ### Aliases: hello
>
> ### ** Examples
>
> isolate()
Error in isolate() : could not find function "isolate"
Execution halted
1 error ✖ | 0 warnings ✔ | 0 notes ✔
Error: R CMD check found ERRORs
Execution halted
Exited with status 1. |
It is because they are not re-exported. I stand corrected 👍 |
I'm not sure what's going on. |
For now we have prefixing in examples and However this active and soon to be closed PR #506 removes prefixing and |
So we either
|
There are too many docs that we need to double check if we move this to |
It might not be that big change in the option that @m7pr mentioned, granted it's 17 files that need to be touched, but there's only 1 user-facing example (
|
Yeah, we have GHA tests/flows that can verify if that transition (from Depends to Imports) and change in examples gives the proper build of the package. I assume we can just see if there is anything requiring |
these change seem to do the trick. Pushed a sandbox branch (based on the current |
Please also don't forget about |
The Good point about the |
# Pull Request - Fixes #529 ℹ️ Note: The package imports all functions from `{shiny}` via `@import shiny` {roxygen2} tag, however, there's a mixed bag of prefixed (`shiny::fun(...)`) and non-prefixed calls (`fun(...)`) in the (functions') code. ~~Those were not modified.~~ (see discussion) #### Changes description - Remove occurences of `shiny::` from `R/` code - Moved `{shiny}` to Imports - Replaced shiny functions in examples by - add `library(shiny)` when building a shiny app to run - ~~`fun` -> `shiny::fun` for others~~ - Corrects vignettes accordingly --------- Signed-off-by: André Veríssimo <211358+averissimo@users.noreply.github.com> Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Aleksander Chlebowski <114988527+chlebowa@users.noreply.github.com>
Depends
type of dependency is generally discouraged. Would it be possible to move this toImports
instead?The text was updated successfully, but these errors were encountered: