Closed ElsLommelen closed 2 years ago
Did you try running setup_package()
(but review all changes and revert those you do not want)? This should also have added the CITATION file. It worked for me with the protocolhelper
package - although initially I saw a similar message but it was gone after PR #63 .
I tried running setup_package()
first now, but this makes no difference (except for some minor changes in .gitignore and _pkgdown.yml): the CITATION file was already added after using check_package()
yesterday, and I think this file hasn't changed when using setup_package()
(and I actually hope it doesn't change this way: this would mean different unrelated functions are developed to generate the same file, or the same function generates a each time a different file, and both are a recipe for problems when performing checks on it ;-) ).
By the way, I encountered the same problem in another package. I could also give the content of the generated CITATION file, or I could test a solution for the problem on this second package, I leave it up to you.
Did you commit the CITATION file? You get the error when git notices changes (untracked, unstaged or staged) to the CITATION file. Committing the CITATION file generated by check_package()
should remove the error.
Indeed, that's it: it has to be committed.
Could you please make this clear somewhere for all users? Preferably clarify this in the error message CITATION needs an update
itself, or otherwise add it somewhere in the function documentation of update_citation()
(though this may be less relevant for users that only need this function) or in the vignette describing the setup.
@ElsLommelen can you check the updated message in 26d9c1d
The message looks fine to me, I would certainly know what to do after reading it.
solved in #69
Today I installed the new version of checklist (0.1.13), which solved a lot of issues for me (thanks!), but when running the
check_package()
test, I suddenly got a new error on the subject of CITATION:CITATION file needs an update.
I noticed on the NEWS website that a new functionupdate_citation()
was added, that (according to the function description) creates or updates the fileinst/CITATION
. So I ran this function to solve the problem, but it gave the same error both locally and on github (where I didn't push the file yet).The generated file
inst/CITATION
has the following content:It is nice to have such additions that I honestly would just forget to add, but maybe it could be helpful to have some reference to information that helps solving problems in case they occur (e.g. a link to a manual on citations in the function documentation)?