mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-16 04:28:11 +00:00
Synthesise a `named` import for every NAMESPACE importFrom(pkg, name) whose pkg is a local package, into each R/ file of the importing package (populateRNamespaceImports, wired via populateWorkspaceReferences with postExtractSourceTextPolicy 'uncached-files'), and resolve it in resolveRImportTarget's named branch. Rules: last entry wins per name over all entries; a self-import, an external last entry, and a name the importing package defines at top level (own namespace masks) synthesise nothing. The named branch builds no workspace file index, returns null for external or unknown packages, dotted names (finalize keys defs by the text after the last dot), providers whose NAMESPACE does not export the name (backticks stripped), names with no top-level definition, and a defining file that also holds a dotted def whose tail equals the name. Top-level definitions are read from the Module scope's hoisted bindings, not ownedDefs/localDefs. Known limitations, pinned by tests: pkg::name() qualifiers are discarded at this point, a nested same-named function can still win the binding, and POSIX-class exportPattern() never matches in a JS RegExp. |
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| integration | ||
| unit | ||
| utils | ||