Closed tphilippi closed 1 year ago
by renaming aplpack/CITATION to aplpack/xCITATION I prevent this issue. So perhaps CRAN doesn't check for valid CITATION files in packages. I've asked the maintainer of aplpack to fix or delete the problematic CITATION file. However, the source .tar.gz for aplpack does not include a CITATION file, so I don't even know if the package owner or something in the process of generating windows binaries generated that problematic CITATION file.
This clearly isn't fundamentally a problem with bibtex, as the same package bombs citation(). However, because it can have huge but hidden consequences (mismatched key vs package for all packages after alphabetically aplpack), it there's an easy way to trap this error in bibtex::write.bib(), that could save other users hard to detect problems.
@tphilippi thanks for registering the concern. We recently changed the bibtex parser to use R instead of C.
In generating a .bib file for my installed packages, I get a mismatch part way through, where the rest of the .bib file has the key assigned to the previous package. A minimum reproducible example:
The jag in bibtex_version.bib is:
I have tested in both R 3.5.3 bibtex_0.4.2 and R 3.6.0 bibtex_0.4.2 The similar knitr::write_bib() function does not generate this mis-match of keys, but it pulls very different information from the package info.
I think the problem may be in the CITATION file for aplpack, which is a quoted bibentry, not p1 p2 citHeader() citEntry() textVersion as for most other packages.
I will contact that package's maintainers, but since that version made it past the package checkers, it might be nice to add some error trapping to this package, too.
Also, note that citation('aplpack') fails: