conan icon indicating copy to clipboard operation
conan copied to clipboard

[suggestion] "conan remove" command add support for removing empty recipe

Open didarpin opened this issue 1 year ago • 4 comments

What is your suggestion?

I need to remove all empty recipe (has no package). I suggest adding this feature to "conan remove" command.

Have you read the CONTRIBUTING guide?

  • [x] I've read the CONTRIBUTING guide

didarpin avatar Jan 04 '24 01:01 didarpin

Hi @didarpin

Thanks for your suggestion. The conan remove command already allows to remove recipes without packages:

$ conan remove zlib* -c

will remove the zlib recipes, even if they don't have binary packages

memsharded avatar Jan 04 '24 01:01 memsharded

@memsharded Thanks! "conan remove zlib* -c" command remove all zlib recipes. Maybe I didn't explain it clearly. What I mean is, only delete empty recipe, and not delete non empty recipe, This is very useful for automation.

didarpin avatar Jan 04 '24 01:01 didarpin

Maybe I didn't explain it clearly. What I mean is, only delete empty recipe, and not delete non empty recipe, This is very useful for automation.

I see. There is no pattern at the moment that can be passed to conan remove that implements this logic. What is the use case, could you please elaborate? What is the automation that you are implementing? In the any case it seems it could be easily implement in a custom command.

memsharded avatar Jan 04 '24 08:01 memsharded

Any further feedback here?

memsharded avatar May 17 '24 12:05 memsharded

Closing as staled. Please re-open or create new tickets for any further questions or comments.

There is no pattern that allows to remove only recipes that have no binaries. The use case for this is not very clear yet. And if users want this logic, it should be relatively straightforward to implement it in a custom command.

Thanks for the feedback!

memsharded avatar Jun 07 '24 09:06 memsharded