Skip to content

Fix(windows): Allow 'sqlmesh clean' to delete cache file paths that exceed 260 chars#5512

Merged
erindru merged 1 commit intomainfrom
erin/fix-clean-windows
Oct 9, 2025
Merged

Fix(windows): Allow 'sqlmesh clean' to delete cache file paths that exceed 260 chars#5512
erindru merged 1 commit intomainfrom
erin/fix-clean-windows

Conversation

@erindru
Copy link
Collaborator

@erindru erindru commented Oct 8, 2025

Currently, on Windows, running sqlmesh clean can return a FileNotFound error if it tries to delete a file path that is > 260 chars.

This PR addresses this particular case.

Note that SQLMesh behaves badly on Windows if the entire project is located at a base path that exceeds 260 characters, because all the model / seed loading code that assumes paths work starts to subtly break.

This PR does not address that, just the cache file paths that we create that the user has no control over.

@erindru erindru force-pushed the erin/fix-clean-windows branch from 23eff11 to cc49d33 Compare October 8, 2025 23:58
@erindru erindru changed the title Fix(windows): Allow 'sqlmesh clean' to delete cache files that exceed 260 chars Fix(windows): Allow 'sqlmesh clean' to delete cache file paths that exceed 260 chars Oct 9, 2025
@erindru erindru merged commit 5435ff8 into main Oct 9, 2025
36 checks passed
@erindru erindru deleted the erin/fix-clean-windows branch October 9, 2025 19:06
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.

3 participants