refactor: convert mlxcel-core and mlxcel-surgery into workspace members#15
Merged
Merged
Conversation
Add [workspace] section to the root Cargo.toml (Option A: root crate is also a workspace root) with members = [".", "src/lib/mlxcel-core", "src/lib/mlxcel-surgery"] and resolver = "2". This unifies the dependency graph so that cargo test -p mlxcel-core and cargo test -p mlxcel-surgery resolve dev-dependencies (e.g. tracing-test) correctly from the root, eliminating the need to cd into each sub-crate directory to run tests. Per-crate Cargo.lock files in src/lib/mlxcel-core/ and src/lib/mlxcel-surgery/ were already absent — no files were deleted. The unified Cargo.lock now includes the previously missing dev-dep entries (sha2 0.11, tracing-test 0.2.6, tracing-test-macro 0.2.6) from mlxcel-core. Collapse dependabot.yml from three separate cargo entries (root, mlxcel-core, mlxcel-surgery) into a single root-level cargo entry covering the unified workspace lock. The github-actions entry is unchanged. cargo deny check passes after the consolidation (pre-existing duplicate warnings for tower and tower-http are unaffected). cargo check --lib -p mlxcel-core --no-default-features also passes, confirming workspace dep resolution is correct.
This file contains hidden or 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
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.
Summary
[workspace]section to rootCargo.toml(Option A: root crate is simultaneously the workspace root) withmembers = [".", "src/lib/mlxcel-core", "src/lib/mlxcel-surgery"]andresolver = "2"..github/dependabot.ymlfrom three separate cargo entries into a single root-level entry covering the unified workspace lock.Pre-flight finding
Per-crate
Cargo.lockfiles insrc/lib/mlxcel-core/andsrc/lib/mlxcel-surgery/were already absent — Task 2 from the issue body ("Remove the per-crate Cargo.lock files") was a no-op. The actual scope was just adding[workspace]and simplifyingdependabot.yml.What changed
Cargo.toml: Added[workspace]table before[package]; three crates are now workspace members.Cargo.lock: Unified lock now includes the previously missing dev-dep entries frommlxcel-core:sha2 0.11,tracing-test 0.2.6,tracing-test-macro 0.2.6. These were previously invisible to the root lock, causingcargo test -p mlxcel-corefrom root to fail on dev-dep resolution..github/dependabot.yml: Collapsed three separate cargo entries (root, mlxcel-core, mlxcel-surgery) into a single root-level entry. Thegithub-actionsentry is unchanged.Verification
cargo metadata --no-depsconfirms all three crates appear inworkspace_members.cargo check --lib -p mlxcel-core --no-default-featurespasses — workspace dep resolution is correct without triggering the full MLX C++ build.cargo deny checkpasses — pre-existing duplicate warnings fortower/tower-httpare unaffected by the workspace migration.CONTRIBUTING.mdhas no workaround note aboutcd src/lib/mlxcel-core— no documentation changes needed.Closes #7