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

[hotfix] Remove package by its reference #9459

Merged
merged 2 commits into from Aug 23, 2021

Conversation

uilianries
Copy link
Member

@uilianries uilianries commented Aug 20, 2021

Now it's possible to remove a packages based on its package reference, for example:

conan remove foobar/0.1@user/testing#f3367e0e7d170aa12abccb175fee5f97:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9

As we can't break our current behavior, [-p|--package] is still valid but when both package reference and -p have a package ID, it will be considered an error, resulting in a ConanException

I didn't use pytest, because the entire file is python unittest and I don't want to mix the things. Let's update in a next PR as enhancement.

Changelog: Fix: Make conan remove accept package reference syntax.
Docs: conan-io/docs#2198

Fixes: #6545

/cc @danimtb

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Signed-off-by: Uilian Ries <uilianries@gmail.com>
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

Good job.

@memsharded memsharded added this to the 1.40 milestone Aug 23, 2021
@memsharded memsharded merged commit 77a3e5b into conan-io:develop Aug 23, 2021
@memsharded
Copy link
Member

I didn't use pytest, because the entire file is python unittest and I don't want to mix the things. Let's update in a next PR as enhancement.

Not a concern for me to write new tests (changing tests it is worse, because not easy to see what changed), but if you don't mind, as you prefer, sure.

Copy link
Member

@danimtb danimtb left a comment

Choose a reason for hiding this comment

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

✔️

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.

[bug] conan remove does not accept a package reference syntax
3 participants