Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to normal field selectors and generic-lens #562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 28, 2024

  1. Switch to normal field selectors and generic-lens

    This adopts the approach discussed here:
    #465 (comment)
    
    That is:
    - We export normal, non-prefixed record selectors (still using
      `DuplicateRecordFields`, of course).
    - Users who want lenses can use `generic-lens`; `lsp` and `lsp-test` do
      this.
    - It's sensible for `lsp-types` to define some useful lenses that aren't
      derived from fields; these go in a `lsp-types-lens` component.
    
    I think the result is... fine?
    kcsongor/generic-lens#96 is a pain in some
    cases, but by and large using the generic lenses is quite nice.
    
    I also tried to just use `OverloadedRecordDot` instead of lenses where I
    could, since we now support 9.2 as our earliest version. I couldn't
    quite get rid of `lens` in `lsp`, it's too useful. I did get rid of it
    entirely in `lsp-types`, which was quite painful in at least one place.
    
    This would obviously be a huge breaking change, but I think it's the
    right direction.
    michaelpj committed Mar 28, 2024
    Configuration menu
    Copy the full SHA
    463025b View commit details
    Browse the repository at this point in the history