Skip to content

chore(deps): remove shellexpand dependency#22471

Closed
gakonst wants to merge 1 commit intomainfrom
mattsse/remove-shellexpand
Closed

chore(deps): remove shellexpand dependency#22471
gakonst wants to merge 1 commit intomainfrom
mattsse/remove-shellexpand

Conversation

@gakonst
Copy link
Member

@gakonst gakonst commented Feb 22, 2026

Summary

Remove shellexpand dependency which is broken with the latest nightly due to str::as_str() stabilization (rust-lang/rust#130366) shadowing Cow::as_str().

Changes

  • Add reusable expand_tilde() and expand_path() helpers in reth_node_core::utils
  • Replace shellexpand::full() in reth-node-core with expand_path()
  • Replace shellexpand::tilde() in reth-bench-compare with reth_node_core::utils::expand_tilde()
  • Replace shellexpand::full() in reth-cli with local expand_tilde() (using dirs-next)
  • Remove shellexpand from workspace deps

Testing

cargo +nightly clippy --workspace --lib --examples --tests --benches --all-features --locked passes clean.

Prompted by: mattsse

shellexpand is broken with the latest nightly due to str::as_str()
stabilization (rust-lang/rust#130366) shadowing Cow::as_str().

Replaces it with reusable expand_tilde() and expand_path() helpers in
reth_node_core::utils, using dirs-next (already a dependency).

Amp-Thread-ID: https://ampcode.com/threads/T-019c83d4-3dbb-74de-b8ef-e8f96afefb92
Co-authored-by: Amp <amp@ampcode.com>
@github-actions
Copy link
Contributor

⚠️ Changelog not found.

A changelog entry is required before merging. We've generated a suggested changelog based on your changes:

Preview
---
reth-bench-compare: patch
reth-cli: patch
reth-node-core: patch
---

Removed the `shellexpand` dependency and replaced it with a custom `expand_tilde` and `expand_path` implementation using `dirs-next`. Updated `parse_path` and related `FromStr` error types to use `VarError` directly instead of `shellexpand::LookupError<VarError>`.

Add changelog to commit this to your branch.

@GrigorenkoPV
Copy link

The stabilization of str::as_str is currently being reverted in rust-lang/rust#152963

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

can wait for fix and pin ci until then

@mattsse mattsse closed this Feb 23, 2026
@github-project-automation github-project-automation bot moved this from Backlog to Done in Reth Tracker Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants