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

Reporter API: report files before collection #6915

Closed
4 tasks done
AriPerkkio opened this issue Nov 15, 2024 · 0 comments · Fixed by #6931
Closed
4 tasks done

Reporter API: report files before collection #6915

AriPerkkio opened this issue Nov 15, 2024 · 0 comments · Fixed by #6931
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@AriPerkkio
Copy link
Member

Clear and concise description of the problem

There is no way for a reporter to know if a file is currently being collected. If the collection phase is slow (e.g. transforms 100000 files due to barrel files), end users have no idea what is going on. Reporters cannot inform user about slow files.

Suggested solution

Before collection for a file starts, inform reporters on onTaskUpdate hook that file is in queue. It could be something like File & { mode: 'queued' }. Next expected state after this is run.

Somewhere around here:

const file = createFileTask(filepath, config.root, config.name, runner.pool)
runner.onCollectStart?.(file)
clearCollectorContext(filepath, runner)

Alternative

No response

Additional context

The summary of #6893 could display queued files even before they start running.

Validations

@AriPerkkio AriPerkkio added the p2-nice-to-have Not breaking anything but nice to have (priority) label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant