Skip to content
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

Inconsistent behavior between pdm remove and pdm update #2885

Closed
greyli opened this issue May 15, 2024 · 0 comments · Fixed by #2886
Closed

Inconsistent behavior between pdm remove and pdm update #2885

greyli opened this issue May 15, 2024 · 0 comments · Fixed by #2886
Assignees
Labels
⭐ enhancement Improvements for existing features

Comments

@greyli
Copy link
Contributor

greyli commented May 15, 2024

Is your feature/enhancement proposal related to a problem? Please describe.

I don't know if it's intentional or something that needs to be improved. When you delete a dev package, you will need to select the dependency group correctly:

$ pdm remove ruff
Removing packages from default dependencies: ruff
[ProjectError]: ruff does not exist in default dependencies.

You have to use pdm remove --dev or pdm remove -dG based on the specific group:

$ pdm remove --dev ruff
Removing packages from dev dev-dependencies: ruff
...
  ✔ Remove ruff 0.4.4 successful

🎉 All complete!

But the pdm update doesn't check the dependency group:

$ pdm update ruff
Updating packages: ruff.
🔒 Lock successful
All packages are synced to date, nothing to do.

🎉 All complete!

Describe the solution you'd like

Make the behavior consistent between pdm remove and pdm update if possible.

@greyli greyli added the ⭐ enhancement Improvements for existing features label May 15, 2024
@frostming frostming self-assigned this May 16, 2024
frostming added a commit that referenced this issue May 16, 2024
Fixes #2885

Signed-off-by: Frost Ming <me@frostming.com>
frostming added a commit that referenced this issue May 16, 2024
* fix: Inconsistent behavior between `pdm remove` and `pdm update`
Fixes #2885

Signed-off-by: Frost Ming <me@frostming.com>

* fix: add test

Signed-off-by: Frost Ming <me@frostming.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ enhancement Improvements for existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants