Skip to content

Alias-based named re-exports emit dangling absolute-path symbol targets #1983

Closed

Description

@oleksii-tumanov

Context

On current v8 (8cee776c, graphifyy 0.9.18), a named re-export through a tsconfig path alias emits a symbol-level re_exports edge whose target contains the checkout path and does not exist in the graph. The edge is later dropped, so symbol-level provenance through the barrel is lost.

This is the separate follow-up requested in the maintainer comment on #1967. Open PR #1976 still reproduces this case at its current head; it fixes cross-extension file-node disambiguation rather than alias-derived symbol IDs.

Reproducer

tsconfig.json:

{"compilerOptions":{"baseUrl":".","paths":{"@/*":["src/*"]}}}

src/lib/utils.ts:

export function formatDate() { return "ok" }

src/lib/index.ts:

export { formatDate } from "@/lib/utils"

Run extraction with relative inputs from the project root:

from pathlib import Path
from graphify.extract import extract

result = extract(sorted(Path("src").rglob("*.ts")), cache_root=Path("."))
node_ids = {node["id"] for node in result["nodes"]}
print([
    (edge["target"], edge["target"] in node_ids)
    for edge in result["edges"]
    if edge.get("relation") == "re_exports"
])

Current behavior

Path-sanitized relevant output:

("<checkout>_src_lib_utils_formatdate", false)
("src_lib_utils", true)

The AST extractor is sufficient to reproduce this; no semantic cache entry is involved.

Expected

The symbol-level edge should target the existing canonical symbol src_lib_utils_formatdate, while the file-level re_exports edge remains unchanged. No target ID should contain a checkout-specific prefix.

Activity

  1. safishamsi commented on Jul 18, 2026

    @safishamsi
    Member

    Fixed in 0.9.20 via #1984 (e5a4b51), thanks @oleksii-tumanov. Aliased named re-exports no longer emit dangling absolute-path symbol targets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions