Skip to content
This repository was archived by the owner on Dec 19, 2020. It is now read-only.

add wit clean #85

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add wit clean #85

wants to merge 4 commits into from

Conversation

aaronjanse
Copy link
Contributor

I don't know if there is much of a demand for a wit clean command, but here's some code.

It currently only removes workspace subdirectories that aren't packages.
Should it also git reset --hard HEAD packages? If it does, people could lose important work to their uncommitted manifest changes.

Or maybe we do git reset --hard HEAD but confirm first if that includes resetting manifests?

@@ -319,3 +326,14 @@ def version() -> None:
version = re.sub(r"^v", "", version)

print("wit {}".format(version))


def clean(ws, args) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

See my comment in the wit foreach PR -- Unfortunately wit-manifest.json isn't a reliable indicator of package-ness. Iterating through the packages from the wit resolution algorithm is the safest way to do this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants