Skip to content

fix(affected): BFS never starts — _build_import_graph keys don't match input path #189

Description

@Wolfvin

Root Cause (verified)

PR #184 fixed the workspace-as-first-arg heuristic in commands/affected.py.
But get_affected_files still returns affected_count: 0 because _build_import_graph
produces keys that don't match the input path.

Investigation needed:

  1. Print all_known_files from _build_import_graph — what keys does it actually produce?
  2. Print cf_rel (normalized input path) — does it match any key?
  3. Check _parse_js_imports regex — does it resolve .ts extensions correctly?

Likely: _build_import_graph either (a) still produces backslash keys on Windows
for some code paths not covered by PR #184's normalization, or (b) the regex
import parser doesn't match TS import paths (imports use './google-auth-cache'
without .ts extension, resolver needs to try adding .ts/.js).

Definition of Done

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug-fixRegression or broken behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions