Commit b0067a9
authored
refactor: migrate to Session API with improved caching and cross-platform support (#89)
## Summary
Major refactoring of the task execution system with a new Session-based architecture, improved caching with detailed miss reasons, and comprehensive cross-platform support.
### Architecture Changes
- Migrate to new Session API, removing legacy code from `vite_task`
- Add new `vite_task_bin` crate for CLI and test infrastructure
- Implement event-based Reporter trait with `LabeledReporter` for formatted output
- Move cache status from Finish to Start event for immediate feedback
### Cache System Improvements
- Display specific cache miss reasons (env changes, input changes, cwd changes)
- Add option to disable cache per-task
- Show simplified cache status for single built-in commands
- Improve cache statistics display in execution summary
### Execution Infrastructure
- Implement `execute_spawn()` with fspy tracking for file system access monitoring
- Real-time output emission during spawn execution using `tokio::select!`
- Add `PostRunFingerprint` for content-based cache invalidation
- Support for synthetic tasks with `additional_envs` field
### Cross-Platform Fixes
- Windows path handling in snapshot redaction
- Use `@yarnpkg/shell` for cross-platform e2e tests
- Preserve Windows system env vars for cmd.exe compatibility
- Track `FindFirstFile`/`FindNextFile` on Windows for cache invalidation
### Testing
- Add comprehensive e2e test fixtures (cache-disabled, cache-keys, cache-miss-reasons, etc.)
- New snapshot test infrastructure with path and duration redaction
- Add `test_bins` utilities for testing (json-edit, print-env, print-file, replace-file-content)
### Other Changes
- Fix spelling: "Syntatic" → "Syntactic"
- Add workspace `node_modules/.bin` to session PATH
- Various CI workflow fixes
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent ec517aa commit b0067a9
File tree
211 files changed
+9007
-6547
lines changed- .github/workflows
- crates
- fspy/tests
- vite_graph_ser
- src
- vite_path/src/absolute
- vite_task_bin
- src
- test_bins
- src
- tests/test_snapshots
- fixtures
- additional-envs
- cache-disabled
- cache-keys
- cache-miss-reasons
- cache-sharing
- comprehensive-task-graph
- packages
- api
- app
- config
- pkg#special
- tools
- ui
- conflict-test
- packages
- scope-a-b
- scope-a
- test-package
- dependency-both-topo-and-explicit
- packages
- a
- b
- empty-package-test
- packages
- another-empty
- empty-name
- normal-package
- error_cycle_dependency
- exit-codes
- packages
- pkg-a
- pkg-b
- explicit-deps-workspace
- packages
- app
- core
- utils
- fingerprint-ignore-test
- recursive-topological-workspace
- apps/web
- packages
- app
- core
- utils
- transitive-dependency-workspace
- packages
- another-a
- a
- src
- b1
- b2
- c
- vite-task-smoke
- snapshots
- vite_task_graph
- src
- config
- query
- vite_task_plan
- src
- vite_task
- src
- bin
- cli
- config
- session
- cache
- execute
- tests
- fixtures/transitive-dependency-workspace
- snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
211 files changed
+9007
-6547
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
| |||
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
| 92 | + | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| |||
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
0 commit comments