Skip to content

fix: handle non-file URIs in derived_{package,project}_for_file#157

Merged
pfitzseb merged 1 commit into
mainfrom
sp/fix-splitpath-untitled-uri
Jul 22, 2026
Merged

fix: handle non-file URIs in derived_{package,project}_for_file#157
pfitzseb merged 1 commit into
mainfrom
sp/fix-splitpath-untitled-uri

Conversation

@pfitzseb

Copy link
Copy Markdown
Member

uri2filepath returns nothing for non-file scheme URIs (e.g. untitled buffers). When the workspace contained a package/project folder, the filter block ran splitpath(nothing) and threw a MethodError, crashing get_test_items on didOpen of an untitled file.

Return nothing early when the file has no filesystem path: an untitled file cannot belong to a package or project.

uri2filepath returns nothing for non-file scheme URIs (e.g. untitled
buffers). When the workspace contained a package/project folder, the
filter block ran splitpath(nothing) and threw a MethodError, crashing
get_test_items on didOpen of an untitled file.

Return nothing early when the file has no filesystem path: an untitled
file cannot belong to a package or project.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pfitzseb
pfitzseb merged commit 7d7038f into main Jul 22, 2026
20 checks passed
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.

1 participant