Skip to content

fix(wassette): add exdev-safe fallback for component loading#109

Merged
Mossaka merged 2 commits into
mainfrom
mossaka/issue107
Aug 8, 2025
Merged

fix(wassette): add exdev-safe fallback for component loading#109
Mossaka merged 2 commits into
mainfrom
mossaka/issue107

Conversation

@Mossaka

@Mossaka Mossaka commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

implements fallback to copy+rename when rename returns error 18 indicating a EXDEV.

Closes #107

Signed-off-by: Jiaxiao Zhou duibao55328@gmail.com

implements fallback to copy+rename when rename returns error 18 indicating a EXDEV.

Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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)]

Comment thread crates/wassette/src/lib.rs
Comment thread crates/wassette/src/lib.rs

@thomastaylor312 thomastaylor312 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Fix is good to go, but I have concerns with adding test only code into the main code path here

Comment thread crates/wassette/src/lib.rs Outdated
Comment thread crates/wassette/src/lib.rs Outdated
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
@Mossaka Mossaka merged commit 74a260b into main Aug 8, 2025
3 checks passed
@Mossaka Mossaka deleted the mossaka/issue107 branch August 8, 2025 01:32
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.

Invalid cross-device link

3 participants