Skip to content

impact: every TypeScript function lists the same unrelated export-star barrel files as [text] re-exporters #1496

Closed

Description

@swapnilpaliwal-sd

Symptom

On a TypeScript repository whose src has many export * from '…' barrel files, impact of an ordinary function lists the same 30 [text] rows under "reads or uses it", whatever the function is:

[text] index.<module>   parser/src/enums/csharp/index.ts:1   -- re-exports the whole module it is declared in (export * -- a rename changes what this file exports) (22 sites)
[text] index.<module>   parser/src/enums/python/index.ts:1   -- re-exports the whole module it is declared in (export * -- …) (16 sites)
…

and adds the same two unrelated test index.ts files as "test callable(s) that also reach it".

None of those barrels re-exports the target's module: enums/csharp/index.ts only has export * from '@/enums/csharp/<subfolder>' lines, and the targets live in parsers/typescript/extractors/*.ts and parsers/javascript/extractors/*.ts, which no barrel re-exports.

Reproduce (3 targets, same 30 rows each time)

  • impact jsxTagReference (a module-level function in a JavaScript extractor file)
  • impact parser/src/parsers/typescript/extractors/ts-expression-extractor.ts:840 (a module-level function)
  • impact parser/src/parsers/typescript/extractors/ts-binder.ts:164 (a module-level function)

Each answer: reads or uses it (N callable(s): … 30 text …) with the identical barrel list, and the identical "+2 test callable(s)" note.

Expected

A barrel is listed only if its export * chain actually reaches the target's module. Here none does, so no [text] re-export rows.

Impact

The rows are counted in the summary line and fill the second half of every page, so each answer claims 30 extra dependents and the "low-certainty rows" section is always the same noise.

Activity

  1. swapnilpaliwal-sd commented on Sep 28, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Fixed by #1591 (merged into 0.1.4): an export * line is now listed only where it re-exports the target's module, including transitive export *, the .js spelling and paths aliases. Regression case: tests/cases/typescript/export-star-scoped-to-its-source.

  2. swapnilpaliwal-sd commented on Sep 29, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Re-checked on the latest 0.1.9: still fixed.

    • axiomcode impact jsxTagReference, impact callKindOf, impact buildCore (all --page all): 0 export * barrel [text] rows each (was 30).
    • Control: impact parser/src/analysis-types/javascript/JsBlockRegistry.ts:95 still lists exactly one barrel, parser/src/analysis-types/javascript/index.ts:1 (export * from './JsBlockRegistry').

    Fixed by #1591 (regression case tests/cases/typescript/export-star-scoped-to-its-source).

  3. swapnilpaliwal-sd commented on Sep 29, 2026

    @swapnilpaliwal-sd
    ContributorAuthor

    Already fixed on the latest 0.1.9 by #1591 (an export * row now requires the barrel's specifier chain to reach the target's module, including tsconfig paths aliases like @/…).

    Repro on a freshly indexed graph of this repository (axiomcode index, then axiomcode impact <t> --page all):

    target reads or uses it [text] re-export rows
    parser/src/parsers/typescript/extractors/ts-binder.ts:164 45 resolved 0
    parser/src/parsers/typescript/extractors/ts-expression-extractor.ts:840 1 resolved 0
    jsxTagReference 6 resolved 0

    Control (must still list its barrel): axiomcode impact CsEventKind → [text] index.<module> parser/src/enums/csharp/events/index.ts:1 — re-exports it.

    Golden case: tests/cases/typescript/export-star-scoped-to-its-source.

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

Metadata

Metadata

Labels

bugSomething isn't workingskillAgent-facing query skill (skills/axiomcode)typescriptTypeScript

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions