Skip to content

Make requirements static to prepare for 2.0 - #258

Merged
stephencelis merged 1 commit into
mainfrom
static-reflection
Sep 2, 2026
Merged

Make requirements static to prepare for 2.0#258
stephencelis merged 1 commit into
mainfrom
static-reflection

Conversation

@stephencelis

Copy link
Copy Markdown
Member

Currently, completing from a case key path from \. returns a bunch of extra endpoints due to the Sequence requirements of AllCasePaths leaking through, as well as the subscript used to look up the case path for a particular case:

  • lazy
  • publisher
  • underestimatedCount
  • [_:]

This is a lot of noise that gets in the way, so let's rethink things:

  • Iterating over all of an enum's case paths now requires an explicit Array(Enum.allCasePaths).
  • Getting a particular case of an enum is already achievable via enum.case, so we can make that the main requirement.

Currently, completing from a case key path from `\.` returns a bunch of extra endpoints due to the
`Sequence` requirements of `AllCasePaths` leaking through, as well as the subscript used to look up
the case path for a particular case:

- `lazy`
- `publisher`
- `underestimatedCount`
- `[_:]`

This is a lot of noise that gets in the way, so let's rethink things:

- Iterating over all of an enum's case paths now requires an explicit `Array(Enum.allCasePaths)`.
- Getting a particular case of an enum is already achievable via `enum.case`, so we can make that
  the main requirement.
@stephencelis
stephencelis merged commit 52a1071 into main Sep 2, 2026
4 checks passed
@stephencelis
stephencelis deleted the static-reflection branch September 2, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants