Skip to content

cargo rm cannot handle wildcard package spec in profile setting overrides #12620

@cyqsimon

Description

@cyqsimon

Problem

When using the wildcard syntax to specify profile setting overrides for all dependencies, cargo rm will error:

error: invalid character * in pkgid: *, the first character must be a Unicode XID start character (most letters or _)

Steps

  1. Create a new cargo project
  2. Add the following section to Cargo.toml:
[profile.dev.package."*"]
opt-level = 3
  1. Run cargo add foo
  2. Run cargo rm foo, and observe the error

Version

cargo 1.72.0 (103a7ff2e 2023-08-15)
release: 1.72.0
commit-hash: 103a7ff2ee7678d34f34d778614c5eb2525ae9de
commit-date: 2023-08-15
host: x86_64-unknown-linux-gnu
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.1.2-DEV (sys:0.4.63+curl-8.1.2 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u  30 May 2023
os: EndeavourOS Rolling Release (rolling) [64-bit]

Metadata

Metadata

Assignees

Labels

C-bugCategory: bugCommand-removeE-easyExperience: EasyS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions