Skip to content

Canary: MergeDeep failures in typescript@next not detected by canary tests #784

@voxpelli

Description

@voxpelli

I'm seeing a lot of these style of errors in the canary tests in my own modules:

Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(144,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Destination>>>[number]' and 'UnknownArrayOrTuple'.
Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(144,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Destination>>>[number]' and 'UnknownRecord'.
Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(144,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Source>>>[number]' and 'UnknownArrayOrTuple'.
Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(170,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Destination>>>[number]' and 'UnknownArrayOrTuple'.
Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(170,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Destination>>>[number]' and 'UnknownRecord'.
Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(170,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Source>>>[number]' and 'UnknownArrayOrTuple'.
Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(196,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Destination>>>[number]' and 'UnknownArrayOrTuple'.
Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(196,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Destination>>>[number]' and 'UnknownRecord'.
Error: ../node_modules/read-pkg/node_modules/type-fest/source/merge-deep.d.ts(196,5): error TS2321: Excessive stack depth comparing types 'PickRestType<ArrayTail<ArrayTail<Source>>>[number]' and 'UnknownArrayOrTuple'.

I didn't receive them in typescript@5.4.0-dev.20231119 then started receiving them in typescript@5.4.0-dev.20231121.

To avoid a regression once typescript@5.4.0 gets launched, we should track down the cause of this and file an issue with typescript if needed.

We should also track down why the canary tests in type-fest itself isn't catching it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions