-
-
Notifications
You must be signed in to change notification settings - Fork 722
refactor(ci): use cargo tree for conformance job detection #14269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Refactors the CI conformance job to use cargo tree for dependency detection instead of static path filtering, while extracting common functionality into reusable modules.
- Replace
dorny/paths-filterwithcargo tree-based detection for more accurate dependency tracking - Extract shared utilities and file detection logic into reusable modules
- Eliminate code duplication across CI scripts by consolidating common functions
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Updates conformance job to use new check-conformance-changes.js script |
.github/scripts/utils.js |
New shared utilities for command execution and crate dependency detection |
.github/scripts/get-changed-files.js |
New reusable module for GitHub event-based file change detection |
.github/scripts/generate-benchmark-matrix.js |
Refactored to use shared modules instead of duplicated code |
.github/scripts/check-conformance-changes.js |
New conformance detection script using cargo tree dependencies |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merge activity
|
## Summary - Replace `dorny/paths-filter` with `cargo tree`-based detection for more accurate dependency tracking in the conformance CI job - Extract common file detection and utility functions into reusable modules - Eliminate code duplication across CI scripts ## Changes ### New Files - **`.github/scripts/get-changed-files.js`** - Reusable module for detecting changed files from GitHub events (PR/push) - **`.github/scripts/check-conformance-changes.js`** - Conformance detection using `cargo tree -p oxc_coverage -p oxc_transform_conformance -p oxc_prettier_conformance` - **`.github/scripts/utils.js`** - Shared utilities: - `exec()` - Shell command execution with error handling - `getCrateDependencies()` - Generic cargo tree wrapper - `checkFilesAffectCrates()` - File-to-crate impact checking ### Modified Files - **`.github/scripts/generate-benchmark-matrix.js`** - Refactored to use shared modules - **`.github/workflows/ci.yml`** - Conformance job now uses `check-conformance-changes.js` instead of `dorny/paths-filter` ## Benefits - **More accurate**: Uses actual crate dependencies from `cargo tree` instead of static path patterns - **Maintainable**: Shared utilities eliminate code duplication - **Extensible**: Easy to add new scripts that need similar functionality - **Consistent**: Same file detection logic across all CI scripts ## Test Plan - [x] Verify CI workflow syntax is valid - [ ] Monitor first PR run to ensure conformance detection works correctly - [ ] Check that conformance is skipped when appropriate (e.g., linter-only changes) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
af4447a to
632652d
Compare
Summary
dorny/paths-filterwithcargo tree-based detection for more accurate dependency tracking in the conformance CI jobChanges
New Files
.github/scripts/get-changed-files.js- Reusable module for detecting changed files from GitHub events (PR/push).github/scripts/check-conformance-changes.js- Conformance detection usingcargo tree -p oxc_coverage -p oxc_transform_conformance -p oxc_prettier_conformance.github/scripts/utils.js- Shared utilities:exec()- Shell command execution with error handlinggetCrateDependencies()- Generic cargo tree wrappercheckFilesAffectCrates()- File-to-crate impact checkingModified Files
.github/scripts/generate-benchmark-matrix.js- Refactored to use shared modules.github/workflows/ci.yml- Conformance job now usescheck-conformance-changes.jsinstead ofdorny/paths-filterBenefits
cargo treeinstead of static path patternsTest Plan
🤖 Generated with Claude Code