Skip to content
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

Improve feedback from @inherits and friends #1311

Merged
merged 6 commits into from
Apr 1, 2022
Merged

Improve feedback from @inherits and friends #1311

merged 6 commits into from
Apr 1, 2022

Conversation

hadley
Copy link
Member

@hadley hadley commented Mar 31, 2022

And considerably reduce the scope of link tweaking.

Fixes #1135.

@hadley hadley requested a review from gaborcsardi March 31, 2022 13:45
@hadley
Copy link
Member Author

hadley commented Mar 31, 2022

@gaborcsardi do you think it's safe to just remove all of find_topic_filename and friends?

@gaborcsardi
Copy link
Member

I will take a better look tomorrow to be sure.

Copy link
Member

@gaborcsardi gaborcsardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@gaborcsardi
Copy link
Member

gaborcsardi commented Apr 1, 2022

@hadley Re find_topic_filename() (and friends), I tried to make it a no-op:

find_topic_filename <- function(pkg, topic, tag = NULL) {
  return(topic)
}

and this doesn't really break anything, except that we need to update/remote 2-3 test cases. I checked on a two days old R-devel as well.

OTOH there are a couple of things to consider.

  1. It does change the generated manual of course. E.g. for ggplot2:

    ❯ git diff man/ | wc -l
         437
    

    so this will be a bit disrupting.

  2. There is a slight, but non-zero chance that a link breaks because the escaping of special characters in topic names works out differently if we don't rewrite the links. This is just a theoretical possibility to keep in mind if we see broken links, so definitely not a major issue.

  3. Currently it is nice to get a warning from roxygen if you try to link to a non-existent topic. If we remove the link lookup, then this goes away, and you only learn about broken links from R CMD check (unless you turn off the rd xrefs check of course, which you might). So even if we don't rewrite the links, it might make sense to still do the link lookup, and warn for broken links.

@hadley
Copy link
Member Author

hadley commented Apr 1, 2022

Yeah, so maybe just easier to leave as is for now.

@hadley hadley merged commit a900753 into main Apr 1, 2022
@hadley hadley deleted the inherits-feedback branch April 1, 2022 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: make missing link warnings more verbose
2 participants