Skip to content

fix(extract): rewrite alias re-export targets - #1984

Closed
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/alias-reexport-targets
Closed

oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/alias-reexport-targets

Conversation

@oleksii-tumanov

Copy link
Copy Markdown
Contributor

Summary

  • rewrite uniquely identified dangling alias re_exports symbol targets to their canonical owned node
  • preserve ambiguous or legitimately owned targets and leave existing import twin-deduplication unchanged

Fixes #1983

Result

For the issue fixture, path-normalized re_exports targets now resolve as:

("src_lib_utils_formatdate", true)
("src_lib_utils", true)

The symbol-level and file-level provenance edges both remain present.

Testing

  • python -m pytest tests/test_js_import_resolution.py tests/test_import_extension_resolution.py tests/test_extract.py tests/test_extraction_spec_ids.py -q (277 passed, 1 skipped)
  • python -m pytest tests/ -q --tb=short --ignore=tests/test_ollama_retry_cap.py (3357 passed, 33 skipped; optional OpenAI SDK tests were unavailable locally)
  • python -m ruff check graphify/extract.py tests/test_js_import_resolution.py (passed)

@safishamsi

Copy link
Copy Markdown
Member

Landed on v8 and shipped in 0.9.20 (e5a4b51), cherry-picked to preserve your authorship. Thanks @oleksii-tumanov — aliased named re-exports (export { X as Y } from ...) now rewrite to the canonical symbol node instead of a dangling absolute-path target; external re-exports and owned ids are left untouched. This is the symbol-level residual after #1967/#1976.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants