Skip to content

Fix FileSnippet test race and retry the unchanged-content read - #846

Merged
SimonCropp merged 1 commit into
mainfrom
fix-filesnippet-race
Sep 24, 2026
Merged

SimonCropp merged 1 commit into
mainfrom
fix-filesnippet-race

Conversation

@SimonCropp

Copy link
Copy Markdown
Owner

The 28.4.4 release failed on net48 with IOException: ... one.md ... being used by another process in FileSnippetExplicitIncludeBypassesExcludeSnippetFiles (reproduced locally 3/30).

  • FileSnippet and FileSnippetExplicitIncludeBypassesExcludeSnippetFiles both processed DirectoryMarkdownProcessor/FileSnippet and wrote the same one.md in parallel. The second now has its own copy of the fixture (FileSnippetExplicitInclude).
  • WriteLines read the existing target to skip unchanged writes with no retry, while the write already retried on IOException. The read now retries the same way, and treats a still-locked file as changed so the (retrying) write path handles it.

After the change: full suite passes, and the racy pair ran 30/30 clean on net48.

@SimonCropp
SimonCropp merged commit 2ba9435 into main Sep 24, 2026
4 checks passed
@SimonCropp
SimonCropp deleted the fix-filesnippet-race branch September 24, 2026 02:08
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