Skip to content

header-parser should mention which file failed to parse #719

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

We're seeing a bug similar to #28 in DefinitelyTyped/DefinitelyTyped#66547 -> https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/6020542203/job/16332030773?pr=66547:

Parsing definitions...
Found 8665 packages.
Parsing in 2 child process(es)...
Error: At 3:0 : Expected one of
	/(, )|(,?\r?\n\/\/\s\s+)/
	/\r?\n\/\/ Definitions by: /
    at parseHeaderOrFail (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/header-parser/src/index.ts:56:11)
    at combineDataForAllTypesVersions (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/definitions-parser/src/lib/definition-parser.ts:230:24)
    at getTypingInfo (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/definitions-parser/src/lib/definition-parser.ts:76:15)
    at /home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/definitions-parser/src/lib/definition-parser-worker.ts:18:41
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Error: disconnect with 721 outputs left
    at ChildProcess.<anonymous> (/home/runner/work/DefinitelyTyped/DefinitelyTyped/node_modules/@definitelytyped/utils/src/process.ts:78:16)
    at ChildProcess.emit (node:events:5[13](https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/6020542203/job/16332030773?pr=66547#step:6:14):28)
    at finish (node:internal/child_process:930:[14](https://github.com/DefinitelyTyped/DefinitelyTyped/actions/runs/6020542203/job/16332030773?pr=66547#step:6:15))
    at processTicksAndRejections (node:internal/process/task_queues:78:11)

Which file's header was it? Who knows!

Edit: Also...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions