Skip to content

Commit 0e3014d

Browse files
committed
fix(ci): update MSRV to 1.88 and fix Windows VFS path handling
- Update rust-version from 1.85 to 1.88 to match Wasmtime 38.0 requirements - Fix VFS builder path joining to maintain Unix-style paths on all platforms - Refactor collapsible_if in config validation per new clippy lint Fixes: - MSRV check failure: Wasmtime 38.0 requires Rust 1.88.0 - Windows test failures: VFS path separator handling on Windows - test_complete_generation_workflow_vkteams - test_empty_server_generation - test_complex_schema_generation - test_vfs_directory_listing All 314 tests now pass on all platforms.
1 parent bebe362 commit 0e3014d

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resolver = "2"
1515
[workspace.package]
1616
version = "0.1.0"
1717
edition = "2024"
18-
rust-version = "1.85"
18+
rust-version = "1.88"
1919
authors = ["MCP Execution Team"]
2020
license = "MIT OR Apache-2.0"
2121
repository = "https://github.com/bug-ops/mcp-execution"

crates/mcp-core/src/config.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ impl RuntimeConfig {
180180
return Err("Execution timeout must be greater than zero".to_string());
181181
}
182182

183-
if let Some(cache_dir) = &self.cache_dir {
184-
if cache_dir.as_os_str().is_empty() {
185-
return Err("Cache directory path cannot be empty".to_string());
186-
}
183+
if let Some(cache_dir) = &self.cache_dir
184+
&& cache_dir.as_os_str().is_empty()
185+
{
186+
return Err("Cache directory path cannot be empty".to_string());
187187
}
188188

189189
Ok(())

crates/mcp-vfs/src/builder.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,20 @@ impl VfsBuilder {
117117
#[must_use]
118118
pub fn from_generated_code(code: GeneratedCode, base_path: impl AsRef<Path>) -> Self {
119119
let mut builder = Self::new();
120-
let base = base_path.as_ref();
120+
let base = base_path.as_ref().to_string_lossy();
121+
122+
// Ensure base path ends with a trailing slash for proper joining
123+
let base_normalized = if base.ends_with('/') {
124+
base.into_owned()
125+
} else {
126+
format!("{}/", base)
127+
};
121128

122129
for file in code.files {
123-
// Construct full path by joining base path with file path
124-
let full_path = base.join(&file.path);
125-
builder = builder.add_file(full_path, file.content);
130+
// Use string concatenation to maintain Unix-style paths on all platforms
131+
// This ensures VFS paths are always forward-slash separated, even on Windows
132+
let full_path = format!("{}{}", base_normalized, file.path);
133+
builder = builder.add_file(full_path.as_str(), file.content);
126134
}
127135

128136
builder

0 commit comments

Comments
 (0)