Skip to main content

Module packages

Module packages 

Source
Expand description

#2223 follow-up: what the editor needs to know about a project’s path dependencies.

The compile folds a dependency’s units in under canonical names (bynk_check::packages::apply_graph), but completion, hover and the unit-name rungs of go-to-definition read source text, where a consumer writes money.currency and the dependency declares plain currency. A DependencyView bridges the two: it resolves a written <alias>.<unit> to the dependency and the unit it declares, says whether the unit is exported, and tells which files belong to a dependency, so the editor offers exactly what the compiler accepts.

Structs§

DependencyTarget
A written dependency reference, resolved.
DependencyView
The project’s dependency graph, as the editor reads it.

Functions§

hover_note
The line hover appends for a dependency unit.
unit_sources_for
The project-relative source paths of the unit a uses/consumes target names, from an analysed round’s unit_sources — what go-to-definition opens. A dependency unit is keyed by its canonical name, so money.currency is looked up through view when it isn’t a key itself.