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

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?

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.

3 participants