Skip to content

PRs pass tic but not R CMD Check #186

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

Closed
lorenzwalthert opened this issue Sep 6, 2017 · 17 comments
Closed

PRs pass tic but not R CMD Check #186

lorenzwalthert opened this issue Sep 6, 2017 · 17 comments

Comments

@lorenzwalthert
Copy link
Collaborator

I note that various PRs (e.g. #183, not merged or #179, merged) that do not pass R CMD Check on travis, but are showed as passing on the conversation tab of the PR.
@krlmlr Is that an issue with tic?
I submitted #185 to fix R CMD Check. The error was arguably introduced with #174.

@krlmlr
Copy link
Member

krlmlr commented Sep 7, 2017

This may be a change in rcmdcheck, tic expects a named list with components errors, warnings and notes as a result of rcmdcheck::rcmdcheck_(). @gaborcsardi: Can you please confirm?

@gaborcsardi
Copy link
Member

Those components are still there, but there are some new ones as well.

@lorenzwalthert
Copy link
Collaborator Author

I merged #185, so the master branch R CMD Check is perfect again, but we can rebuild previous PRs such as #179 that suffer from the same problem.

@gaborcsardi
Copy link
Member

OK. (I don't understand, though, #185 is only adding a single space, seemingly.)

@lorenzwalthert
Copy link
Collaborator Author

Yes, I only added a space, but this space is needed for the tests to pass. Most tests in styler are "take a file, style it and compare it to a reference file". So I updated the reference file because before, the styling rule was adapted and yields a different outcome than before.

@gaborcsardi
Copy link
Member

Oh, so this is not an rcmdcheck issue then.

@lorenzwalthert
Copy link
Collaborator Author

@krlmlr so should we file an issue in tic and close this?

@krlmlr
Copy link
Member

krlmlr commented Sep 15, 2017

@gaborcsardi: I can replicate locally.

git clone https://github.com/krlmlr/tic.package.git --branch f-test-failure
cd tic.package
R -q -e 'remotes::install_github("ropenscilabs/tic")'
R -q -e 'install.packages("rcmdcheck")'
R -q -e 'tic::script()' # fails to fail
R -q -e 'remotes::install_github("r-lib/rcmdcheck")'
R -q -e 'tic::script()' # fails successfully

How do I reliably count the errors, warnings, and notes from an rcmdcheck object in both the CRAN and GitHub versions of rcmdcheck?

@gaborcsardi
Copy link
Member

I don't understand. So this is an rcmdcheck issue, then? How are you doing it now? This should do it:

length(x$errors) + length(x$warnings) + length(x$notes)

@krlmlr
Copy link
Member

krlmlr commented Sep 15, 2017

Relevant code in tic looks similar: https://github.com/ropenscilabs/tic/blob/master/R/steps-rcmdcheck.R#L13-L22

It seems to work as expected with the GitHub version of rcmdcheck, but not with the CRAN version of rcmdcheck, this is what my reprex above demonstrates.

@gaborcsardi
Copy link
Member

This seems to be a bug in the CRAN version of rcmdcheck. The error is not even found.

@lorenzwalthert
Copy link
Collaborator Author

Am I right that the next rcmdcheck CRAN release is going fix this so we can close this issue?

krlmlr added a commit to ropensci/tic that referenced this issue Sep 18, 2017
because the CRAN version doesn't properly detect errors, e.g. https://travis-ci.org/krlmlr/styler/builds/272236933#L1365

See also r-lib/styler#186
@krlmlr
Copy link
Member

krlmlr commented Sep 18, 2017

tic will install rcmdcheck from GitHub for now, please watch out for check failures that are not recognized by Travis or AppVeyor.

@krlmlr krlmlr closed this as completed Sep 18, 2017
@lorenzwalthert
Copy link
Collaborator Author

WIth #205, I get perfect local rcmdcheck::rcmdcheck(), one NOTE with devtools::test() because of a top level file in the directoy (which is not checked in git) and an early terminated CI using tic.

@krlmlr
Copy link
Member

krlmlr commented Sep 28, 2017

NOTEs currently don't cause a test to fail, but this can be changed in tic.R. Should we?

@lorenzwalthert
Copy link
Collaborator Author

Well since the offending file causing devtools::check() (and not dectools::test() as stated above) is not checked into git, the note is not the problem on our CI (it's rather that rcmdcheck::rcmdcheck() should give me a NOTE locally). My main point, however, was that as with #205, I don't see a X ERRORS, Y WARNINGS, Z NOTES at the end of the process (which I expect).

@krlmlr
Copy link
Member

krlmlr commented Sep 28, 2017

Yeah, tic should print a summary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants