Skip to content

Reporter API: report files before collection #6915

@AriPerkkio

Description

@AriPerkkio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-haveNot breaking anything but nice to have (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions