Skip to content

Commit 2ce6d04

Browse files
authored
Merge branch 'main' into fix/rename-too-many-args
2 parents faf2ee9 + 69cc6eb commit 2ce6d04

File tree

8 files changed

+80
-40
lines changed

8 files changed

+80
-40
lines changed

.claude/skills/update-changelog.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
description: Update CHANGELOG.md with a new entry for the current change
3+
user_invocable: true
4+
---
5+
6+
# Update Changelog
7+
8+
Add a new entry to `CHANGELOG.md` for the change being made in the current branch.
9+
10+
## Instructions
11+
12+
1. Read `CHANGELOG.md` to understand the current format.
13+
2. Determine the appropriate category for the change:
14+
- **Added** — new user-facing feature or capability
15+
- **Changed** — modification to existing user-facing behavior
16+
- **Removed** — removal of user-facing feature or option
17+
- **Fixed** — bug fix affecting users
18+
- **Perf** — performance improvement noticeable to users
19+
3. Write a concise, user-facing description. Focus on what changed from the user's perspective, not implementation details.
20+
4. Include a PR link in the format `([#NNN](https://github.com/voidzero-dev/vite-task/pull/NNN))`. If the PR number is not yet known, leave a `([#???](https://github.com/voidzero-dev/vite-task/pull/???))` placeholder.
21+
5. Insert the new entry at the **top** of the existing list in `CHANGELOG.md` (newest first).
22+
6. If the current change is closely related to an existing entry (e.g., multiple PRs contributing to the same feature or fix), group them into a single item with multiple PR links rather than adding a separate entry.
23+
24+
## What NOT to include
25+
26+
Do not add entries for:
27+
28+
- Internal refactors with no user-facing effect
29+
- CI/CD changes
30+
- Dependency bumps
31+
- Test-only fixes (flaky tests, test infrastructure)
32+
- Documentation changes (CLAUDE.md, README, etc.)
33+
- Chore/tooling changes
34+
35+
The changelog is for **end-users only**.
36+
37+
## Entry format
38+
39+
```
40+
- **Category** description ([#NNN](https://github.com/voidzero-dev/vite-task/pull/NNN))
41+
```

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,6 @@ jobs:
149149
# -crt-static: vite-task is shipped as a NAPI module in vite+, and musl Node
150150
# with native modules links to musl libc dynamically, so we must do the same.
151151
RUSTFLAGS: --cfg tokio_unstable -D warnings -C target-feature=-crt-static
152-
# On musl, concurrent PTY operations can trigger SIGSEGV in musl internals.
153-
# Run test threads sequentially to avoid the race.
154-
RUST_TEST_THREADS: 1
155152
steps:
156153
- name: Install Alpine dependencies
157154
shell: sh {0}
@@ -175,7 +172,14 @@ jobs:
175172
corepack enable
176173
pnpm install
177174
178-
- run: cargo test
175+
# Use cargo-nextest: it runs each test in its own process, avoiding
176+
# musl's fork()-in-multithreaded-process SIGSEGV while keeping parallel
177+
# execution (across processes instead of threads within one process).
178+
# Exclude packages with custom test harnesses (harness = false) since
179+
# nextest can't discover their tests; run those with cargo test instead.
180+
- run: cargo install cargo-nextest --locked
181+
- run: cargo nextest run --workspace --exclude vite_task_bin --exclude vite_task_plan
182+
- run: cargo test -p vite_task_bin -p vite_task_plan
179183

180184
fmt:
181185
name: Format and Check Deps

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
- **Changed** default untracked env patterns to align with Turborepo, covering more CI and platform-specific variables ([#262](https://github.com/voidzero-dev/vite-task/pull/262))
4+
- **Added** `--log=interleaved|labeled|grouped` flag to control task output display: `interleaved` (default) streams directly, `labeled` prefixes lines with `[pkg#task]`, `grouped` buffers output per task ([#266](https://github.com/voidzero-dev/vite-task/pull/266))
5+
- **Added** musl target support (`x86_64-unknown-linux-musl`) ([#273](https://github.com/voidzero-dev/vite-task/pull/273))
6+
- **Changed** cache hit/miss indicators to use neutral symbols (◉/〇) instead of ✓/✗ to avoid confusion with success/error ([#268](https://github.com/voidzero-dev/vite-task/pull/268))
7+
- **Added** automatic skip of caching for tasks that modify their own inputs ([#248](https://github.com/voidzero-dev/vite-task/pull/248))

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,10 @@ All code must work on both Unix and Windows without platform skipping:
135135
- Platform differences should be handled gracefully, not skipped
136136
- After major changes to `fspy*` or platform-specific crates, run `just lint-linux` and `just lint-windows`
137137

138+
## Changelog
139+
140+
When a change is user-facing (new feature, changed behavior, bug fix, removal, or perf improvement), run `/update-changelog` to add an entry to `CHANGELOG.md`. Do not add entries for internal refactors, CI, dep bumps, test fixes, or docs changes.
141+
138142
## Quick Reference
139143

140144
- **Task Format**: `package#task` (e.g., `app#build`, `@test/utils#lint`)

crates/vite_task/src/session/execute/fingerprint.rs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
use std::{
77
collections::BTreeMap,
88
fs::File,
9-
hash::Hasher as _,
10-
io::{self, BufRead, Read},
9+
io::{self, BufRead},
1110
sync::Arc,
1211
};
1312

@@ -182,20 +181,6 @@ fn determine_folder_change_kind<'a>(
182181
}
183182
}
184183

185-
/// Hash file content using `xxHash3_64`
186-
fn hash_content(mut stream: impl Read) -> io::Result<u64> {
187-
let mut hasher = twox_hash::XxHash3_64::default();
188-
let mut buf = [0u8; 8192];
189-
loop {
190-
let n = stream.read(&mut buf)?;
191-
if n == 0 {
192-
break;
193-
}
194-
hasher.write(&buf[..n]);
195-
}
196-
Ok(hasher.finish())
197-
}
198-
199184
/// Check if a directory entry should be ignored in fingerprinting
200185
fn should_ignore_entry(name: &[u8]) -> bool {
201186
matches!(name, b"." | b".." | b".DS_Store") || name.eq_ignore_ascii_case(b"dist")
@@ -251,7 +236,7 @@ pub fn fingerprint_path(
251236
return process_directory(std_path, path_read);
252237
}
253238
}
254-
Ok(PathFingerprint::FileContentHash(hash_content(reader)?))
239+
Ok(PathFingerprint::FileContentHash(super::hash::hash_content(reader)?))
255240
}
256241

257242
/// Process a directory on Windows using `std::fs::read_dir`

crates/vite_task/src/session/execute/glob_inputs.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,7 @@
55
//!
66
//! All glob patterns are workspace-root-relative (resolved at task graph stage).
77
8-
use std::{
9-
collections::BTreeMap,
10-
fs::File,
11-
hash::Hasher as _,
12-
io::{self, Read},
13-
};
8+
use std::{collections::BTreeMap, fs::File, io};
149

1510
#[cfg(test)]
1611
use vite_path::AbsolutePathBuf;
@@ -114,21 +109,9 @@ pub fn compute_globbed_inputs(
114109
Ok(result)
115110
}
116111

117-
/// Hash file content using `xxHash3_64`.
118112
#[expect(clippy::disallowed_types, reason = "receives std::path::Path from wax glob walker")]
119113
fn hash_file_content(path: &std::path::Path) -> io::Result<u64> {
120-
let file = File::open(path)?;
121-
let mut reader = io::BufReader::new(file);
122-
let mut hasher = twox_hash::XxHash3_64::default();
123-
let mut buf = [0u8; 8192];
124-
loop {
125-
let n = reader.read(&mut buf)?;
126-
if n == 0 {
127-
break;
128-
}
129-
hasher.write(&buf[..n]);
130-
}
131-
Ok(hasher.finish())
114+
super::hash::hash_content(io::BufReader::new(File::open(path)?))
132115
}
133116

134117
#[cfg(test)]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use std::{hash::Hasher as _, io};
2+
3+
/// Hash content using 8 KiB buffered `xxHash3_64`.
4+
pub(super) fn hash_content(mut stream: impl io::Read) -> io::Result<u64> {
5+
let mut hasher = twox_hash::XxHash3_64::default();
6+
let mut buf = [0u8; 8192];
7+
loop {
8+
let n = stream.read(&mut buf)?;
9+
if n == 0 {
10+
break;
11+
}
12+
hasher.write(&buf[..n]);
13+
}
14+
Ok(hasher.finish())
15+
}

crates/vite_task/src/session/execute/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pub mod fingerprint;
22
pub mod glob_inputs;
3+
mod hash;
34
pub mod spawn;
45

56
use std::{collections::BTreeMap, io::Write as _, process::Stdio, sync::Arc};

0 commit comments

Comments
 (0)