r-lib / devtools

Tools to make an R developer's life easier
https://devtools.r-lib.org
Other
2.37k stars 755 forks source link

FR: Prompt user to check URLs in `release()` #2483

Closed rossellhayes closed 1 year ago

rossellhayes commented 1 year ago

CRAN's policy of rejecting packages with "incorrect" URLs has caught me out quite a number of times. I often forget to use urlchecker before releasing a package, and there seems to be a new link that needs updating each time.

It would be helpful if release() asked "Have you run urlchecker::url_check()?" before preparing a release.

Currently I include this in a custom release_questions() function in each of my packages, but it would be nice to include this in the default checks, because it seems applicable to every package release.

If this would be helpful, I'd be happy to submit a quick PR.

jennybc commented 1 year ago

release() is somewhat out of favour with some of the maintainers (cough, Hadley). But I still use it too!

However, I'm not sure I want to add new stuff to it. The way URL checking comes into our workflow is via use_release_issue() and the checklist it provides. I think that's a better place for the prompt to check your URLs. Plus, if you're executing the checklist, you're going to see warnings about those same URLs from win-builder and r-hub.

In any case, that will work for you today, regardless of whether we add anything to release().

jennybc commented 1 year ago

Example of a release checklist (but you'll find them all over tidyverse / r-lib packages):

https://github.com/r-lib/devtools/issues/2475

rossellhayes commented 1 year ago

That makes sense, thanks!