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

Provide a unified (lsp-interface INTERFACE ...) pcase form #4559

Merged
merged 6 commits into from
Sep 26, 2024

Commits on Sep 24, 2024

  1. Provide a unified (lsp-interface INTERFACE ...) pcase form

    This commit provides a new unified pcase form (lsp-interface INTERFACE ...) to
    replace the old per-interface (INTERFACE ...) forms -- the latter are now
    deprecated. (Unfortunately, I don't think there's a way to mark a pcase form as
    obsolete.)
    
    I've turned the existing pcase-defmacro definition into a helper function. The
    new pcase form delegates to that helper function, and the old pcase forms now
    delegate to the new form.
    
    This change addresses a few issues, which are detailed in emacs-lsp#4430. In short:
    
    * The existing forms aren't namespaced.
    * The lsp-mode package adds hundreds of forms, which each add several lines to
      pcase's generated docstring, adding up to over 1000 lines.
    * Starting in Emacs 31, the number of forms added by lsp-mode causes a
      noticeable slowdown when loading the interactive help for pcase.
    chrisbouchard committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    2216173 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4f1e7ff View commit details
    Browse the repository at this point in the history
  3. Improve docstring for (lsp-interface ...) pcase form

    I've tried to summarize the behavior of the existing implementation.
    chrisbouchard committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    33ef39b View commit details
    Browse the repository at this point in the history
  4. Replace per-interface pcase forms with the new unified form

    I used ripgrep to search for all occurrences of `pcase`, and then checked each
    to see if it was using a pattern that looked like an LSP interface name. It's
    very possible I missed something, but hopefully not.
    chrisbouchard committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    a8af3c5 View commit details
    Browse the repository at this point in the history
  5. Remove the per-interface pcase forms

    The consensus in emacs-lsp#4430 is that we're ok with making this breaking change and
    communicating it in the CHANGELOG. I've replaced all uses in lsp-mode itself.
    chrisbouchard committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    cd3c963 View commit details
    Browse the repository at this point in the history
  6. Add CHANGELOG entry for pcase changes

    I'm an Org newb, so hopefully this is well-formatted.
    chrisbouchard committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    2ff5cdd View commit details
    Browse the repository at this point in the history