Skip to content

Reporter API: report files before collection #6915

Closed

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

Activity

  1. added
    p2-nice-to-have
    on Nov 15, 2024
  2. locked and limited conversation to collaborators on Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2-nice-to-have

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions