-
Notifications
You must be signed in to change notification settings - Fork 35
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
Prevent new_device = FALSE
from accidentally opening a device
#235
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add this since you can't install the dev version during R CMD check (because the directory structure is different). Fortunately you don't need to since you know that the dev version is already installed. I'm not sure why this didn't affect you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see I am affecting when running
devtools::check()
. I only randevtools::test()
I think.And CI was passing so I trust it. It seems it is passing because this is called
If I call this locally, it passes too. Does it mean
rcmdcheck::rcmdcheck()
will install the package ?I recall I needed to have the package installed so that
callr::rscript()
can find it in libPath().There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, R CMD check has to install the package in order to run the tests, so I think it should be ok. There must be some subtle difference in the directory structures that rcmdcheck uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it does install in an additional temp library right ? And when calling a subprocess we need this information to pass to the subprocess.
I make a parallel with the issue we have with Quarto vignette and pkgdown where, I need the quarto vignette engine to somehow pass
R_LIBS
to the subprocess called.So maybe
quick_install()
was not the solution. If the package currently being check is installed, then it is a matter of passing the information of where tocallr::rscript()
which does not find the right version by default it seems.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got my answer. Details below as a reference from when I'll try to understand again.
R CMD CHECK will install the package in
evaluate.Rcheck
directory, which is added tolibPaths()
byrcmdcheck:::do_check()
. This is why it is found by the subprocess without installing it.R CMD check will run tests frome
evaluate.Rcheck/tests/testthat
, sopkgload::pkg_path(".")
does not manage to find root source package. During R CMD CHECK is seems source is insideevaluate.Rcheck/00_pkg_src
and tests are not run fromevaluate.Rcheck/00_pkg_src/evaluate/tests
.Though I looked at
devtools::check()
and it callsrcmdcheck::rcmdcheck()
, so I was puzzled by the difference.It is related to to
NOT_CRAN = "true"
being set bydevtools::check_built()
while not when callingrcmdcheck::rcmdcheck()
directly.withr::with_envvar(c(NOT_CRAN = "true"), rcmdcheck::rcmdcheck())
: This errorsrcmdcheck::rcmdcheck()
: this does not.So this was passing locally but in fact test are skiped.
So why it work on CI ? On CI
NOT_CRAN: true
is also set butrcmdcheck::rcmdcheck()
is called with acheck_dir
within the source package.Locally I can reproduce no failure with
because in that specific
check_dir
case,pkgload::pkg_path(".")
is working, and finding the source package.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed exploration!