Skip to content

Relative imports never show up in deps or imported_by #541

@nsxdavid

Description

@nsxdavid

Any import path with .. in it gets discarded before it reaches the dependency graph. Every relative import (../foo, ./bar) is invisible. deps only ever lists bare specifiers like node:fs or package names, and imported_by on an internal file returns (none) no matter how many files import it.

core/src/card-io.ts is imported by:
  (none)

card-io.ts is imported all over the codebase. The graph just doesn't know it.

Cause: the skip is if (std.mem.indexOf(u8, imp, "..") != null) continue;, and it lives in two places: rebuildDepsFor (fresh index) and rebuildDepsFromOutline (snapshot restore). The binary always reloads from a snapshot, so the restore copy is the one that bites in practice. That also means it can pass an in-process test and still be broken from the CLI.

Relative specifiers should be resolved against the importing file into real repo paths instead of thrown away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions