[Bug]: Cross-drive syntax-error warning can abort extraction on Windows
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #4149 của @xiehuanyi — đã đóng, không merge
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 124k
- Fork
- 11.9k
- Merge trung bình
- 2 giờ 35 phút
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Graphify-Labs/graphify
-
`file_hash` opens the lowercased path on Windows, so files with uppercase names fail on case-sensitive dirs (`\wsl.localhost`)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Graphify-Labs/graphify#4925 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
watch liveness check resolves relative source identities against process CWD instead of watch rootCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Graphify-Labs/graphify#4896 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
extract --out <dir>: semantic cache never saved, docs missing from manifest (relative source_file resolved against --out)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Graphify-Labs/graphify#4831 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)Có thể đã có người làm @Deepjyoti-Sarmah đã nhận 14 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Graphify-Labs/graphify#4563 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncatesCó thể đã có người làm @bercedev đã nhận 14 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Graphify-Labs/graphify#4546 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Graphify-Labs/graphify
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Nixtla/mlforecast#823 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
microsoft/ML-For-Beginners#1061 ·
-
bot-found documentation priority: P3
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 82/100
madenvel/KalinkaPlayer#503 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
EleutherAI/lm-evaluation-harness#4508 ·
Maintainer thường phản hồi trong vòng 1 ngày