fix(wassette): add exdev-safe fallback for component loading#109
Merged
Conversation
implements fallback to copy+rename when rename returns error 18 indicating a EXDEV. Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a fallback mechanism for component loading when file renaming fails due to cross-device limitations (EXDEV error 18). The change adds resilience to the file handling code by automatically falling back to copy+remove operations when atomic rename operations cannot be performed across different filesystems.
- Adds EXDEV error detection and fallback to copy+remove when rename fails
- Implements test infrastructure to simulate EXDEV conditions
- Adds comprehensive test coverage for both fast path rename and fallback scenarios
Comments suppressed due to low confidence (2)
crates/wassette/src/lib.rs:1475
- The test attribute syntax
#[test(tokio::test)]appears incorrect. It should be#[tokio::test]for async tests in the tokio framework.
#[test(tokio::test)]
crates/wassette/src/lib.rs:1475
- The test attribute syntax
#[test(tokio::test)]appears incorrect. It should be#[tokio::test]for async tests in the tokio framework.
#[test(tokio::test)]
thomastaylor312
left a comment
Collaborator
There was a problem hiding this comment.
Fix is good to go, but I have concerns with adding test only code into the main code path here
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
thomastaylor312
approved these changes
Aug 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
implements fallback to copy+rename when rename returns error 18 indicating a EXDEV.
Closes #107
Signed-off-by: Jiaxiao Zhou duibao55328@gmail.com