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

feat: add pixi clean command #1325

Merged
merged 10 commits into from
Jun 11, 2024

Conversation

ruben-arts
Copy link
Contributor

@ruben-arts ruben-arts commented May 5, 2024

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 ruben-arts marked this pull request as draft May 5, 2024 20:17
@ruben-arts
Copy link
Contributor Author

ruben-arts commented May 5, 2024

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

Edit: fixed

src/cli/clean.rs Show resolved Hide resolved
src/cli/clean.rs Outdated Show resolved Hide resolved
src/cli/clean.rs Show resolved Hide resolved
@bollwyvl
Copy link
Contributor

bollwyvl commented May 6, 2024

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}]

@ruben-arts
Copy link
Contributor Author

@bollwyvl I like this idea!

@ruben-arts
Copy link
Contributor Author

@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 ruben-arts marked this pull request as ready for review June 8, 2024 21:59
Copy link
Contributor

@nichmor nichmor left a comment

Choose a reason for hiding this comment

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

looks good!

@baszalmstra baszalmstra merged commit b5bb774 into prefix-dev:main Jun 11, 2024
27 checks passed
jjjermiah pushed a commit to jjjermiah/pixi that referenced this pull request Jun 11, 2024
- `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: prefix-dev#1321
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.

Add ability to clean pixi cache
4 participants