Skip to content

Pkg.add should display nearest names #616

Closed
@s-celles

Description

@s-celles

Hello,

When doing Pkg.add("NameOfPackage"), if NameOfPackage is not found an error message such as

ERROR: The following package names could not be resolved:
 * NameOfPackage (not found in project, manifest or registry)
Please specify by known `name=uuid`.

is shown.

If a package name is not found, maybe Pkg could try to "help" users by listing name of some packages whom name is quite near to what user is looking for.

Computing string similarity using for example dice coefficient (see various implementations) between user provided package name and name of each registered package could help.

Maybe comparison should be done after upper casing (or lower casing) both.
A threshold could probably be set.
Sorting by descending coefficient will be required, taking only (for example) five nearest names (however displaying them with correct case)

Kind regards

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions