pinp icon indicating copy to clipboard operation
pinp copied to clipboard

package update requires manual replacement of pinp.bst

Open ikashnitsky opened this issue 5 years ago • 4 comments

This is a small nasty thing that mage me kill several hours twice (with a gap of maybe half a year). Once the package is updated, a fresh cope of pinp.bst is required, and the directory with previously knitted document hold an outdated copy. Maybe there is a way to give an informative message in such a case?

ikashnitsky avatar Mar 05 '20 21:03 ikashnitsky

Howdy (and nice meeting you last weekend ;-)

I think that has bit me too once before.

Question is ... how to best compare? Just two file.info() calls and compare size? I'd rather not depend on digest to compare checksums. Does R has a base checksummer? Or should we just always copy it out?

eddelbuettel avatar Mar 05 '20 21:03 eddelbuettel

The issue here is some may modify the pinp.cls file. So, copying on every knit probably isn't ideal.

Probably, best to check file.info() and emit a message that emphasizes the underlying class file changed. If the compilation is broken, then delete the old .cls file for a new one to be added in its place.

The pinp.cls file is not in-sync with the package. This may happen if it has been modified either locally or during a package update. If there is trouble knitting the document, please delete the pinp.cls file.

coatless avatar Mar 05 '20 21:03 coatless

So, copying on every knit probably isn't ideal.

Yep. There was a reason we didn't do that.

But then suppose someone mod'ed it for good reason. Should we then yell at them each time we render the document because we see a change?

A puzzle...

eddelbuettel avatar Mar 05 '20 21:03 eddelbuettel

There is tools::md5sum. So maybe we just 'quickly' run that over both, and issue the warning if different. If we feel generous we can add package-environment toggle to tell it to never yell....

eddelbuettel avatar Mar 05 '20 21:03 eddelbuettel