ruby-lsp icon indicating copy to clipboard operation
ruby-lsp copied to clipboard

Update Prism requirement to v0.28

Open vinistock opened this issue 1 year ago • 4 comments

Motivation

Update our Prism requirement to v0.28 or higher. Version v0.28 includes the new ASCIISource with performance optimization for sources that do not contain multibyte characters, which fixes the performance regression we introduced in semantic highlighting.

Implementation

  1. Updated Prism and RBI
  2. Re-generated gem RBIs
  3. Fixed errors related to the restructuring of constant paths

Before, each part of a constant path was also a constant read. After this version, only the parent parts of the constant path may be constant reads, the main name of the constant is embedded inside the constant path node.

# Before
# This would be 3 constant read nodes to compose the constant path

# After
# This is now 2 constant read nodes and the name `C` is a part of the overall constant path
A::B::C

Automated Tests

Fixed a few tests.

vinistock avatar May 06 '24 18:05 vinistock

Are the vscode/ changes supposed to be part of this PR?

andyw8 avatar May 10 '24 14:05 andyw8

The upgrade ended up uncovering some other Windows errors and I was trying to get CI to pass. If you prefer, I can split that into a separate PR, but the changes are necessary.

vinistock avatar May 10 '24 15:05 vinistock

The upgrade ended up uncovering some other Windows errors and I was trying to get CI to pass. If you prefer, I can split that into a separate PR, but the changes are necessary.

Ok, yeah I'd say we should split them since there's quite a lot of changes. I'll limit my review to the Ruby part.

andyw8 avatar May 10 '24 15:05 andyw8

Split the other part, which needs to be merged first https://github.com/Shopify/ruby-lsp/pull/2033.

vinistock avatar May 10 '24 18:05 vinistock

https://github.com/Shopify/ruby-lsp/pull/2033 is blocked on Windows, so I'll update this branch to remove the /vscode changes.

andyw8 avatar May 16 '24 18:05 andyw8