Skip to content

Commit 377631f

Browse files
authored
chore: bump vite-task to latest main (1acf3eec) (#791)
## Summary - Bump vite-task dependency from `6fdc4f1` to `1acf3eec` (latest main) - Adapt to API changes: `SessionCallbacks` → `SessionConfig` with `program_name`, `EnabledCacheConfig` field renames (`envs`→`env`, `pass_through_envs`→`untracked_env`, `inputs`→`input`) - Update `run-config.ts` types, snap test configs and expected outputs ## Test plan - [x] `cargo check --all-targets --all-features` passes locally - [x] `cargo fmt --check` passes - [ ] CI passes
1 parent a8d5040 commit 377631f

13 files changed

Lines changed: 94 additions & 92 deletions

File tree

Cargo.lock

Lines changed: 34 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ dunce = "1.0.5"
8484
fast-glob = "1.0.0"
8585
flate2 = { version = "=1.1.9", features = ["zlib-rs"] }
8686
form_urlencoded = "1.2.1"
87-
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "6fdc4f106563491be4fb36381b84c5937d74fe9c" }
87+
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "1acf3eec06a91ceaeba880bb2b52b3c93a3f56a0" }
8888
futures = "0.3.31"
8989
futures-util = "0.3.31"
9090
glob = "0.3.2"
@@ -183,15 +183,15 @@ vfs = "0.12.1"
183183
vite_command = { path = "crates/vite_command" }
184184
vite_error = { path = "crates/vite_error" }
185185
vite_js_runtime = { path = "crates/vite_js_runtime" }
186-
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "6fdc4f106563491be4fb36381b84c5937d74fe9c" }
186+
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "1acf3eec06a91ceaeba880bb2b52b3c93a3f56a0" }
187187
vite_install = { path = "crates/vite_install" }
188188
vite_migration = { path = "crates/vite_migration" }
189189
vite_shared = { path = "crates/vite_shared" }
190190
vite_static_config = { path = "crates/vite_static_config" }
191-
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "6fdc4f106563491be4fb36381b84c5937d74fe9c" }
192-
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "6fdc4f106563491be4fb36381b84c5937d74fe9c" }
193-
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "6fdc4f106563491be4fb36381b84c5937d74fe9c" }
194-
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "6fdc4f106563491be4fb36381b84c5937d74fe9c" }
191+
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "1acf3eec06a91ceaeba880bb2b52b3c93a3f56a0" }
192+
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "1acf3eec06a91ceaeba880bb2b52b3c93a3f56a0" }
193+
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "1acf3eec06a91ceaeba880bb2b52b3c93a3f56a0" }
194+
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "1acf3eec06a91ceaeba880bb2b52b3c93a3f56a0" }
195195
walkdir = "2.5.0"
196196
wax = "0.6.0"
197197
which = "8.0.0"

bench/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ criterion = { workspace = true }
1010
rustc-hash = { workspace = true }
1111
tokio = { workspace = true, features = ["rt"] }
1212
vite_path = { workspace = true }
13+
vite_str = { workspace = true }
1314
vite_task = { workspace = true }
1415

1516
[[bench]]

bench/benches/workspace_load.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
44
use rustc_hash::FxHashMap;
55
use tokio::runtime::Runtime;
66
use vite_path::{AbsolutePath, AbsolutePathBuf};
7+
use vite_str::Str;
78
use vite_task::{
8-
CommandHandler, HandledCommand, Session, SessionCallbacks, plan_request::ScriptCommand,
9+
CommandHandler, HandledCommand, Session, SessionConfig, plan_request::ScriptCommand,
910
};
1011

1112
/// A no-op command handler for benchmarking purposes.
@@ -38,16 +39,17 @@ impl vite_task::loader::UserConfigLoader for NoOpUserConfigLoader {
3839

3940
/// Owned session callbacks for benchmarking.
4041
#[derive(Default)]
41-
struct BenchSessionCallbacks {
42+
struct BenchSessionConfig {
4243
command_handler: NoOpCommandHandler,
4344
user_config_loader: NoOpUserConfigLoader,
4445
}
4546

46-
impl BenchSessionCallbacks {
47-
fn as_callbacks(&mut self) -> SessionCallbacks<'_> {
48-
SessionCallbacks {
47+
impl BenchSessionConfig {
48+
fn as_callbacks(&mut self) -> SessionConfig<'_> {
49+
SessionConfig {
4950
command_handler: &mut self.command_handler,
5051
user_config_loader: &mut self.user_config_loader,
52+
program_name: Str::from("vp"),
5153
}
5254
}
5355
}
@@ -67,7 +69,7 @@ fn bench_workspace_load(c: &mut Criterion) {
6769
session_group.bench_function("ensure_task_graph_loaded", |b| {
6870
b.iter(|| {
6971
runtime.block_on(async {
70-
let mut owned_callbacks = BenchSessionCallbacks::default();
72+
let mut owned_callbacks = BenchSessionConfig::default();
7173
let envs: FxHashMap<Arc<OsStr>, Arc<OsStr>> = FxHashMap::default();
7274
let mut session = Session::init_with(
7375
envs,
@@ -85,7 +87,7 @@ fn bench_workspace_load(c: &mut Criterion) {
8587
session_group.bench_with_input(BenchmarkId::new("packages", 100), &fixture_path, |b, path| {
8688
b.iter(|| {
8789
runtime.block_on(async {
88-
let mut owned_callbacks = BenchSessionCallbacks::default();
90+
let mut owned_callbacks = BenchSessionConfig::default();
8991
let envs: FxHashMap<Arc<OsStr>, Arc<OsStr>> = FxHashMap::default();
9092
let mut session =
9193
Session::init_with(envs, path.clone().into(), owned_callbacks.as_callbacks())

0 commit comments

Comments
 (0)