Skip to content

resolve_binary name is misleading #2928

@dandavison

Description

@dandavison

Hi, thanks again for ripgrep! In delta we're using resolve_binary, and I have a question / feature request regarding its API (which I'm opening as a feature request issue). The second sentence of the docstring says "If the program could not be resolved, then an error is returned.", whereas in fact this is only true on Windows, as the last sentence says. This has caused me and others to make mistakes. My question is

  • Would a name like resolve_windows_binary have been a clearer name, or was there a reason not to do that?

And my feature request

  • Assuming a breaking renaming change is not reasonable, how about moving the final sentence of the docstring ("On non-Windows, this is a no-op.") up so that it becomes part of the first sentence of the docstring?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docAn issue with or an improvement to documentation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions