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(cli/test): deno test --clean #23519

Merged
merged 7 commits into from
May 23, 2024
Merged

Conversation

iuioiua
Copy link
Collaborator

@iuioiua iuioiua commented Apr 24, 2024

The result of the call is ignored as it throws even when the directory does not exist.

Closes #23491

Copy link
Member

@bartlomieju bartlomieju left a 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

@lucacasonato
Copy link
Member

This has the downside that you can not run multiple deno test calls in parallel, or even in series unless you specify a different directories.

@iuioiua
Copy link
Collaborator Author

iuioiua commented Apr 25, 2024

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 --no-clean, or similar, flag.

For context, I recently waited for ~5 minutes on my M2 MacBook to delete /coverage for std.

@lucacasonato
Copy link
Member

The point is, as is, this PR breaks existing workflows

@iuioiua
Copy link
Collaborator Author

iuioiua commented Apr 25, 2024

We could make this behaviour opt-in via --clean-cov-dir (or similar) and then at some point decide whether we make this default behaviour in Deno 2.

@iuioiua
Copy link
Collaborator Author

iuioiua commented May 1, 2024

I've changed my mind. I think this should just be opt-in for good.

@iuioiua iuioiua changed the title fix(cli/test): empty coverage directory first feat(cli/test): deno test --clean May 1, 2024
@iuioiua iuioiua requested a review from lucacasonato May 1, 2024 00:50
@bartlomieju bartlomieju added this to the 1.44 milestone May 5, 2024
cli/args/flags.rs Outdated Show resolved Hide resolved
@iuioiua iuioiua requested a review from bartlomieju May 22, 2024 23:17
@iuioiua iuioiua enabled auto-merge (squash) May 23, 2024 00:16
@iuioiua iuioiua merged commit 7137549 into denoland:main May 23, 2024
17 checks passed
@iuioiua
Copy link
Collaborator Author

iuioiua commented May 27, 2024

Should this only work with --coverage?

@iuioiua iuioiua deleted the empty-coverage-dir branch July 12, 2024 00:15
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.

deno test --coverage should clear the coverage directory first
3 participants