pixi icon indicating copy to clipboard operation
pixi copied to clipboard

feat: add `pixi clean` command

Open ruben-arts opened this issue 1 year ago • 3 comments

Initial proposal Includes

  • pixi clean cleans environments
  • pixi clean -e prod cleans a environment
  • pixi clean cache cleans cache dir
  • pixi clean cache --conda/--pypi cleans a specific package cache

fixes: #1321

ruben-arts avatar May 05 '24 20:05 ruben-arts

I'm not happy with the cli yet. I want env to be the default and cache being a sub command.

Edit: fixed

ruben-arts avatar May 05 '24 20:05 ruben-arts

pixi clean task <taskname> would also be very helpful.

In some systems (e.g. doit), clean can be optionally configured to remove:

  • remove all outputs
    • clean = true
  • some specific set of files
    • clean = ["*.tsbuildinfo", "lib"]
  • the clean of all depends-on
    • clean-depends-on = true
      • though maybe this would be better when a depends-on can be a more full task with
        • depends-on = [{task="build", environment="build", clean=true}]

bollwyvl avatar May 06 '24 17:05 bollwyvl

@bollwyvl I like this idea!

ruben-arts avatar May 07 '24 15:05 ruben-arts

@bollwyvl I gave task a try but got burned out by the complexity of the glob work. Still think it's a good idea but I want to get the simple version in first.

ruben-arts avatar Jun 08 '24 21:06 ruben-arts