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(cli/test): deno test --clean
#23519
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an integration test
This has the downside that you can not run multiple |
I think it's a fair trade-off, as long as the behaviour is clearly documented. Perhaps, if we receive too many complaints, which we may not, we can add a For context, I recently waited for ~5 minutes on my M2 MacBook to delete |
The point is, as is, this PR breaks existing workflows |
We could make this behaviour opt-in via |
I've changed my mind. I think this should just be opt-in for good. |
deno test --clean
.arg( | ||
Arg::new("clean") | ||
.long("clean") | ||
.help("Empty the coverage profile data directory before running tests. | ||
|
||
Note: running multiple `deno test --clean` calls in series or parallel for the same coverage directory may cause race conditions.") | ||
.action(ArgAction::SetTrue), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, but I'm wondering if we should reword this to say
"Empty any temporary files created by `deno test` before running the tests. Currently this includes coverage data, but may change in the future."
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like saying it might change in the future might cause some confusion. IMO, how it is now is fine. At most, we could do "Empty the temporary coverage profile data..."
The result of the call is ignored as it throws even when the directory does not exist.
Closes #23491