-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Body:
- Environment:
Operating System: Windows 11
Rust Version: rustc 1.79.0 (or your version)
Node/Bun Version: bun 1.1.12 (or your version)
Commit Hash (if known): 4fb6fd5. This commit already has the code for sandbox fixing:
-
Description of the Bug:
When attempting to build the project on a native Windows environment using bun run tauri dev or bun run tauri build, the compilation fails. The build process errors out when compiling the claudia crate. -
Steps to Reproduce:
Clone the repository on a Windows machine.
Install all prerequisites (Rust, Bun, etc.).
Run bun install.
Attempt to start the development server with bun run tauri dev.
Observe the build failure.
- Error Log / Diagnosis:
The build fails with the error error[E0432]: unresolved import 'crate::sandbox::executor::create_sandboxed_command'.
The root cause is that the create_sandboxed_command function is conditionally compiled and only available on Unix-like systems, as indicated by the #[cfg(unix)] attribute in src/sandbox/executor.rs. The code in src/commands/claude.rs attempts to import this function unconditionally, leading to a build failure on non-Unix platforms like Windows.
error[E0432]: unresolved import crate::sandbox::executor::create_sandboxed_command
--> src\commands\claude.rs:984:26
|
984 | use crate::sandbox::{executor::create_sandboxed_command, profile::ProfileBuilder};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no create_sandboxed_command
in sandbox::executor
|
note: found an item that was configured out
--> src\sandbox\executor.rs:400:8
|
400 | pub fn create_sandboxed_command(
| ^^^^^^^^^^^^^^^^^^^^^^^^
note: the item is gated here
--> src\sandbox\executor.rs:399:1
|
399 | #[cfg(unix)]
| ^^^^^^^^^^^^
5. Proposed Solution / Current Status:
This issue appears to have been resolved in a recent commit on the main branch (e.g., feat(sandbox): implement cross-platform support with Windows fallback). The fix involved creating a Windows-specific implementation for the sandboxing feature. Pulling the latest changes from the main branch resolves the issue.
This format clearly explains the problem, shows how to reproduce it, pinpoints the exact cause, and demonstrates that you've done your research. It's the perfect template for reporting bugs in the future.