Skip to content

package: Remove unused nsh-core dependency - #3107

Open
blueberrycongee wants to merge 2 commits into
longbridge:mainfrom
blueberrycongee:package-remove-unused-core
Open

blueberrycongee wants to merge 2 commits into
longbridge:mainfrom
blueberrycongee:package-remove-unused-core

Conversation

@blueberrycongee

Copy link
Copy Markdown
Contributor

Description

Remove the unused nsh-core dependency from crates/nsh-package/Cargo.toml (and update Cargo.lock).

nsh-package has declared nsh-core.workspace = true since its initial commit, but neither its library nor its tests reference nsh_core. Removing it:

  • Matches the documented dependency direction in docs/dev/architecture.md (where nsh-package is a leaf dependency of nsh-engine and nsh-cli, both of which already depend on nsh-core directly).
  • Eliminates the unused_crate_dependencies warning on nsh-package.
  • Avoids unnecessarily rebuilding nsh-package whenever nsh-core changes.

How to Test

Verified locally:

  • cargo test -p nsh-package (13 unit tests + 18 integration tests passed)
  • cargo clippy -p nsh-package --all-targets -- -W unused-crate-dependencies (no unused dependency warning on nsh-package lib)
  • cargo check -p nsh-package --target wasm32-unknown-unknown
  • cargo clippy --workspace --all-targets
  • cargo test -p nsh-engine package (7 unit tests + 4 integration tests passed)
  • cargo check -p nsh-cli --tests
  • python3 .github/ci/paths.py

Checklist

  • I have read the CONTRIBUTING document and followed the guidelines.
  • Reviewed the changes in this PR and confirmed AI generated code (if any) is accurate.
  • Passed cargo clippy --workspace --all-targets, nsh-package / nsh-engine package tests, wasm32-unknown-unknown check, and .github/ci/paths.py.

nsh-package declared nsh-core in Cargo.toml since its initial commit,
but neither src/ nor tests/ references nsh_core. Removing it aligns the
manifest with the documented dependency direction (docs/dev/architecture.md),
clears unused_crate_dependencies on nsh-package, and avoids rebuilding
nsh-package when nsh-core changes.

@huacnlee huacnlee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM: drops an unused dependency, no API change.

Reviewed c7ee136. nsh-package has no nsh_core reference on main, so removing the dependency and its Cargo.lock entry is safe. The current check failures (SinkEdit / sink_edit never used under "Check without optional features") are in code this PR does not touch.

🤖 Noop (reviewer) · AI agent acting for @huacnlee

@huacnlee

Copy link
Copy Markdown
Member

Merged main into this branch (no conflicts; Cargo.lock auto-merged). The check failures (SinkEdit / sink_edit / floor_char never used in crates/nsh-base/src/sink_text.rs) came from main at the time, not from this change: #3088 added sink_text unconditionally, and #3108 has since gated it behind the editor features. cargo check -p nsh-package -p nsh-base passes locally on the merged head; CI is re-running.

🤖 Noop (rust-maintainer) · AI agent acting for @huacnlee

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants