-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
chore(core): refactor cargo crates #30130
Draft
Cammisuli
wants to merge
11
commits into
master
Choose a base branch
from
cammisuli/refactor-cargo-crates
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
- Added new Rust crates for core Nx functionality: - nx_cache - nx_db - nx_hasher - nx_machine - nx_project_graph - nx_tasks - nx_terminal - nx_walker - nx_watch - nx_workspace - Updated Cargo.toml and Cargo.lock to include new crates - Refactored existing code to use new crate modules - Prepared infrastructure for future Nx core improvements
- Moved `get_mod_time` and normalization utilities from `nx` and `nx_walker` to a new crate `nx_utils`. - Updated references across the codebase to use `nx_utils` for these utilities. - Added `hash_array_optional` function in `nx_hasher` and refactored its usage in `nx`. - Updated `Cargo.toml` and `Cargo.lock` to include `nx_utils` and other dependency updates. - Removed unused utilities and cleaned up imports in various modules.
- Removed `nx_machine` crate and its dependencies. - Introduced a new `nx_logger` crate for logging functionality. - Updated all references to the logger to use `nx_logger`. - Adjusted `Cargo.toml` and `Cargo.lock` to reflect crate changes. - Migrated shared logging utilities to `nx_logger`.
- Moved `ci` module from `nx/native/utils` to `nx_utils` crate for reusability. - Refactored imports to use `nx_utils::ci` across affected files. - Simplified code by optimizing path normalization and hash operations. - Updated dependencies in `Cargo.toml` and `Cargo.lock` for latest versions.
- Relocated `normalize_nx_path` function from `path.rs` to `nx_utils` - Updated usage of `normalize_nx_path` in both `Path` and `PathBuf` implementations - Simplified `path.rs` by removing redundant functionality
d49ec0d
to
4236404
Compare
View your CI Pipeline Execution ↗ for commit 407698f.
☁️ Nx Cloud last updated this comment at |
- Removed `thiserror`, `parking_lot`, and `assert_fs` from `Cargo.toml` and `Cargo.lock`. - Cleaned up unused logger import in `hash_planner.rs`. - Corrected function declarations in `index.d.ts`, resolving duplication issues. - Adjusted `hash_planner.rs` to return `External` directly without environment handling.
- Moved types related to project graph, inputs, and nx_json to a reusable crate, `nx_core`. - Removed redundant `transfer_project_graph` function and refactored imports to use `nx_core`. - Updated `nx_project_graph` and other crates to depend on `nx_core` for shared functionality. - Migrated utility functions like `find_matching_projects` to `nx_project_graph/utils`. - Refactored redundant imports and aligned with consolidated module structure.
- Moved `machine_id` module from `packages/nx` to `crates/nx_utils`. - Updated imports in affected files across the project. - Added `machine-uid` dependency to `nx_utils`. - Refactored code to utilize the new `nx_utils::machine_id`. - Simplified fallback logic in `nx_db` for database file naming.
- Moved pseudo-terminal-related implementation from `packages/nx` to a new standalone `nx_pty` crate for better modularity and reuse. - Updated dependencies and Cargo project files to include `nx_pty`. - Adjusted imports and references in original `packages/nx` code to use `nx_pty`. - Fixed typings and adjusted method signatures to align with new structure.
- Removed inline native db and pseudo-terminal modules from `nx` package. - Moved `pseudo_terminal` modules to `nx_pty` crate. - Moved DB connection handling into `nx_db` crate under a new `napi` module. - Updated dependencies and adjusted imports for modular separation. - Dropped unused dependencies (`tokio`, `crossbeam-channel`, etc.) for cleanup.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #