Skip to content

fix(test): fix flaky tests on neovim nightly#60

Merged
dlyongemallo merged 2 commits intomainfrom
fix_eexist_test_race
Mar 24, 2026
Merged

fix(test): fix flaky tests on neovim nightly#60
dlyongemallo merged 2 commits intomainfrom
fix_eexist_test_race

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 24, 2026 11:41
@dlyongemallo
Copy link
Copy Markdown
Owner Author

This race is apparently the cause of the failure in: https://github.com/dlyongemallo/diffview.nvim/actions/runs/23486180499/job/68342240312?pr=53

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates PathLib.mkdir(..., { parents = true }) to tolerate an EEXIST error from uv.fs_mkdir() when multiple async callers race to create the same intermediate directory.

Changes:

  • Wraps uv.fs_mkdir() for each path component in mkdir -p logic to ignore EEXIST.
  • Preserves existing error handling for other uv errors via handle_uv_err().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/path.lua Outdated
@dlyongemallo dlyongemallo force-pushed the fix_eexist_test_race branch from 40ba5b9 to ca1c3db Compare March 24, 2026 13:20
@dlyongemallo dlyongemallo changed the title fix(path): tolerate EEXIST race in async mkdir -p fix(test): fix flaky tests on neovim nightly Mar 24, 2026
@dlyongemallo dlyongemallo merged commit e6a5375 into main Mar 24, 2026
2 checks passed
@dlyongemallo dlyongemallo deleted the fix_eexist_test_race branch March 24, 2026 13:22
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.

2 participants