[Bug]: Cross-drive syntax-error warning can abort extraction on Windows
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #4149 来自 @xiehuanyi —— 已关闭,未合并
评估
调研方向
Start in graphify/extract.py at the syntax-error warning's display-path conversion, then compare it with the adjacent clean-file warning that handles cross-drive paths. Reproduce with the supplied Lua fixture and different Windows drives, using the stated ntpath.relpath check if needed. Done means extraction returns the graph and emits the partial-extraction warning with a usable source path; an open linked pull request already addresses this issue.
由索引模型根据 Issue 内容生成。
描述
Pre-flight checks
- I have checked the Troubleshooting section in the README
What happened?
A source file with recoverable syntax errors can abort extraction when its path and the scan root are on different Windows drives. The syntax-error warning calls os.path.relpath for its display path, and the resulting ValueError escapes instead of returning the extracted graph and warning.
The expected behavior is to return the graph and report the partial-extraction warning with a usable source path. The adjacent warning for a clean file without symbols already handles this drive condition.
Steps to reproduce
Use this Lua input as broken.lua:
local t = {
function f() end
Call graphify.extract.extract([source], root=scan_root) with the included source and scan root on different Windows drives. This report's execution used a controlled macOS probe: the real extraction entry point ran on this fixture, while the source/root relpath conversion used ntpath.relpath with different drives. A same-drive extraction is the control.
The path operation can be checked independently on any platform:
import ntpath
ntpath.relpath("D:/included/broken.lua", "C:/scan-root")
Error output or graph output
Path-sanitized controlled-probe result:
ValueError: path is on mount 'D:', start on mount 'C:'
The exception escapes the syntax-warning display conversion in graphify/extract.py; the extraction call returns no graph and does not emit the intended warning.
Graphify version
0.9.77; source inspected at 5c7b84792f453582676548185aaec3824d51dfe2 on v8.
Operating System
macOS
Python Version
3.12
Installation Method
built from source (git clone)
Additional Environment Details
The source snapshot was tested with local Python dependencies. The cross-drive operation was simulated with Windows path semantics; this is not a native Windows run. No model request is needed. The earlier cache portability path contained the same exception before the warning failed. No written AST cache file was inventoried, and this report makes no cache-file creation claim.
Additional context
This is the syntax-error warning path. #4059 and #4106 address the separate clean-parse, symbol-less warning; their fix is present in the inspected source. This report does not request changes to graph identities, persisted source paths or cache keys.
- 主要语言
- Python
- 星标
- 124k
- 派生
- 11.9k
- 平均合并
- 2 小时 35 分钟
- 30 天内合并 PR
- 6
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Graphify-Labs/graphify 的其他 Issue
-
`file_hash` opens the lowercased path on Windows, so files with uppercase names fail on case-sensitive dirs (`\wsl.localhost`)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
Graphify-Labs/graphify#4925 · 1 条评论 ·
维护者通常 1 天内回复
-
watch liveness check resolves relative source identities against process CWD instead of watch root可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Graphify-Labs/graphify#4896 · 5 条评论 ·
维护者通常 1 天内回复
-
extract --out <dir>: semantic cache never saved, docs missing from manifest (relative source_file resolved against --out)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
Graphify-Labs/graphify#4831 · 3 条评论 ·
维护者通常 1 天内回复
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)可能已有人在做 @Deepjyoti-Sarmah 于 13 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
Graphify-Labs/graphify#4563 · 2 条评论 ·
维护者通常 1 天内回复
-
GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncates可能已有人在做 @bercedev 于 14 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 69/100
Graphify-Labs/graphify#4546 · 1 条评论 ·
维护者通常 1 天内回复
查看 Graphify-Labs/graphify 的全部 Issue
相似的 Issue
-
URLValidator ignores an explicit empty scheme allowlist可能已有人在做 @IlyaKhalafi 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
tortoise/tortoise-orm#2393 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
frappe/frappe_docker#2046 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
-
complete_box_iou_loss / complete_box_iou: NaN gradients for zero-height boxes, NaN for point boxes未关闭
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
AXI SMU SPEC
难度 2/5 1-3 小时 新手友好度 62/100
tenstorrent/tt-oca-harness#3556 ·
维护者通常 1 天内回复