Skip to content

symbiont: let api_doc/api_index read paths the way a model writes the… - #83

Merged
MathisWellmann merged 2 commits into
mainfrom
api_doc_fuzzy
Oct 8, 2026
Merged

MathisWellmann merged 2 commits into
mainfrom
api_doc_fuzzy

Conversation

@MathisWellmann

Copy link
Copy Markdown
Owner

…m, and suggest the closest names when one does not resolve

render_doc now cleans the query (backticks, a leading item keyword, generic arguments, a trailing () or !), then tries the path as given, then with its leading segments dropped, then Type::member as the type, then a unique name that differs only in case. Each fallback answer starts with a note on the path to use. render_index on a dependency crate name lists the prelude items from that crate. A path that still does not resolve gets up to 5 closest names (case-insensitive containment, then edit distance within a third of the name) in the error. This changes DocIndexError::{ItemNotFound, ModuleNotFound} to carry a Closest.

…m, and suggest the closest names when one does not resolve

render_doc now cleans the query (backticks, a leading item keyword, generic
arguments, a trailing `()` or `!`), then tries the path as given, then with
its leading segments dropped, then `Type::member` as the type, then a unique
name that differs only in case. Each fallback answer starts with a note on the
path to use. render_index on a dependency crate name lists the prelude items
from that crate. A path that still does not resolve gets up to 5 closest
names (case-insensitive containment, then edit distance within a third of the
name) in the error. This changes DocIndexError::{ItemNotFound, ModuleNotFound}
to carry a Closest.
@MathisWellmann MathisWellmann self-assigned this Oct 8, 2026
…w carry a Closest, which breaks downstream matches and constructors
@MathisWellmann
MathisWellmann merged commit fb26d72 into main Oct 8, 2026
3 of 6 checks passed
@MathisWellmann
MathisWellmann deleted the api_doc_fuzzy branch October 8, 2026 13:53
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.

1 participant