X Tutup
Skip to content

bump to v0.3.14#578

Merged
randy3k merged 6 commits intomasterfrom
release/v0.3.14
Oct 16, 2022
Merged

bump to v0.3.14#578
randy3k merged 6 commits intomasterfrom
release/v0.3.14

Conversation

@randy3k
Copy link
Member

@randy3k randy3k commented Oct 13, 2022

Will merge after CRAN accepts the submission.

@randy3k
Copy link
Member Author

randy3k commented Oct 15, 2022

@renkun-ken CRAN check doesn't like the use of attach, PTAL.

R/diagnostics.R Outdated
attach(globals, name = env_name, warn.conflicts = FALSE)
on.exit(detach(env_name, character.only = TRUE))
parent.env(globals) <- environment()
lints <- with(globals, lintr::lint(path, cache = cache, text = content))
Copy link
Member

Choose a reason for hiding this comment

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

What if globals contains symbols such as path, and cache, and content?

Copy link
Member

Choose a reason for hiding this comment

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

I tried putting path <- NULL in a package R file, and the following occurs:

Failed to run diagnostics: ! error in callr subprocess
Caused by error in `if (needs_tempfile) { ...`:
! missing value where TRUE/FALSE needed

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. Let me fix it.

Copy link
Member

@renkun-ken renkun-ken Oct 16, 2022

Choose a reason for hiding this comment

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

Looks like the variables must be accessible from the global environment. Looks like globals must be attached and we'll have to walk-around the CRAN policy?

Copy link
Member

@renkun-ken renkun-ken Oct 16, 2022

Choose a reason for hiding this comment

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

Just like what callr has done using do.call("attach", ...) at

https://github.com/r-lib/callr/blob/5adbb27027c377b3ad0d4b3b471f81b36b02da67/R/hook.R#L7

Copy link
Member Author

Choose a reason for hiding this comment

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

+1

Copy link
Member

@renkun-ken renkun-ken Oct 16, 2022

Choose a reason for hiding this comment

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

Already fixed via 8b27a18.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, submitting to CRAN.

Copy link
Member

@renkun-ken renkun-ken left a comment

Choose a reason for hiding this comment

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

LGTM

@randy3k
Copy link
Member Author

randy3k commented Oct 16, 2022

It's on the way to CRAN.

@randy3k randy3k merged commit a939390 into master Oct 16, 2022
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

X Tutup