Skip to content

Import "did you mean" suggests a bare own-schema path #286

Closed

Description

@Kinflou

Since #285 (#282), a bare path to a package's own schema is import::bare-own-schema-path. But import::unresolved's "did you mean" for a typo still suggests the bare form. For use typse::User it suggests types, so accepting the suggestion leads straight to the bare-path error and a second fix.

When the closest match is one of the package's own schemas, the suggestion (and its fix, if any) should be package::types::User. When it's a dependency or std, it stays absolute.

Found while porting #285 to the language server (language-server#122), which mirrors core's behaviour here. Part of #281.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Now: top prioritycompilerParser, IR, CASdiagnosticsErrors and diagnostics

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions