Skip to content

support large unions of literals #124

@carljm

Description

@carljm

With astral-sh/ruff#17419 we set a low limit on the size of unions-of-literals. We will probably want to increase this limit (maybe to somewhere in the 4-5000 range?), so we can support e.g. exhaustiveness checks on large code-generated enum types.

In order to do this without exposing ourselves to exponential slowdowns, we will need to expand the optimization in astral-sh/ruff#17403 so that, instead of applying just to UnionBuilder, it is applied throughout our union and intersection representation. (That is, groups of same-kind literals are kept in a set and can be handled as a single block, instead of repetitively.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions