-
Notifications
You must be signed in to change notification settings - Fork 174
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
Replace IndexablePath with URI #2916
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vinistock
added
other
Changes that aren't bugfixes, enhancements or breaking changes
server
This pull request should be included in the server gem's release notes
labels
Nov 26, 2024
— with
Graphite App
andyw8
reviewed
Nov 26, 2024
vinistock
changed the base branch from
11-26-move_uri_extension_to_indexer
to
graphite-base/2916
November 27, 2024 14:14
vinistock
force-pushed
the
graphite-base/2916
branch
from
November 27, 2024 14:14
ef41d1f
to
a6842f1
Compare
vinistock
force-pushed
the
11-26-replace_indexablepath_with_uri
branch
from
November 27, 2024 14:14
f5b52b6
to
1af4abb
Compare
vinistock
force-pushed
the
11-26-replace_indexablepath_with_uri
branch
from
November 27, 2024 14:15
1af4abb
to
ea2b9bb
Compare
andyw8
approved these changes
Nov 27, 2024
vinistock
added a commit
that referenced
this pull request
Nov 27, 2024
<!-- NOTE: If you plan to invest significant effort into a large pull request with multiple decisions that may impact the long term maintenance of the Ruby LSP, please open a [discussion](https://github.com/Shopify/ruby-lsp/discussions/new/choose) first to align on the direction. --> ### Motivation Addresses #2916 (comment) Rename `indexables` to `indexable_uris`, which is a much clearer name.
koic
added a commit
to koic/rubocop
that referenced
this pull request
Jan 10, 2025
This PR fixes build error on specs of RubyLSP add-on: ```console $ bundle exec rspec ./spec/ruby_lsp/rubocop/addon_spec.rb (snip) 6 examples, 5 failures Failed examples: rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:104 # RubyLSP::RuboCop::Addon textDocument/formatting has basic result information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:109 # RubyLSP::RuboCop::Addon textDocument/formatting has autocorrected code rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:60 # RubyLSP::RuboCop::Addon textDocument/diagnostic has first diagnostic information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:72 # RubyLSP::RuboCop::Addon textDocument/diagnostic has second diagnostic information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:54 # RubyLSP::RuboCop::Addon textDocument/diagnostic has basic result information ``` This change now requires Ruby LSP 0.23+, which includes Shopify/ruby-lsp#2916, during development.
koic
added a commit
to koic/rubocop
that referenced
this pull request
Jan 10, 2025
This PR fixes the following build errors related to the RubyLSP add-on specs: ```console $ bundle exec rspec ./spec/ruby_lsp/rubocop/addon_spec.rb (snip) 6 examples, 5 failures Failed examples: rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:104 # RubyLSP::RuboCop::Addon textDocument/formatting has basic result information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:109 # RubyLSP::RuboCop::Addon textDocument/formatting has autocorrected code rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:60 # RubyLSP::RuboCop::Addon textDocument/diagnostic has first diagnostic information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:72 # RubyLSP::RuboCop::Addon textDocument/diagnostic has second diagnostic information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:54 # RubyLSP::RuboCop::Addon textDocument/diagnostic has basic result information ``` https://github.com/rubocop/rubocop/actions/runs/12704843475/job/35414859443 This change now requires Ruby LSP 0.23+, which includes Shopify/ruby-lsp#2916, during development.
8 tasks
bbatsov
pushed a commit
to rubocop/rubocop
that referenced
this pull request
Jan 10, 2025
This PR fixes the following build errors related to the RubyLSP add-on specs: ```console $ bundle exec rspec ./spec/ruby_lsp/rubocop/addon_spec.rb (snip) 6 examples, 5 failures Failed examples: rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:104 # RubyLSP::RuboCop::Addon textDocument/formatting has basic result information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:109 # RubyLSP::RuboCop::Addon textDocument/formatting has autocorrected code rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:60 # RubyLSP::RuboCop::Addon textDocument/diagnostic has first diagnostic information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:72 # RubyLSP::RuboCop::Addon textDocument/diagnostic has second diagnostic information rspec ./spec/ruby_lsp/rubocop/addon_spec.rb:54 # RubyLSP::RuboCop::Addon textDocument/diagnostic has basic result information ``` https://github.com/rubocop/rubocop/actions/runs/12704843475/job/35414859443 This change now requires Ruby LSP 0.23+, which includes Shopify/ruby-lsp#2916, during development.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Second step for #1908
This PR gets rid of
IndexablePath
and standardizes on using URI. This is necessary becauseIndexablePath
is coupled with file paths on disk, which is incompatible with the URI scheme for unsaved files (untitled:Untitled-1
) - a scenario where the files don't exist on disk.Implementation
The important changes are just in the URI extension file. Everything else is essentially just renaming things from
IndexablePath
to URI.Note: this PR takes a slightly different approach than my previous attempt. I previously tried to create a separate URI class for the indexer, fully disconnected from the original
URI::Generic
class. That turned out to be a terrible idea that lead to an enormous amount of duplication, so the approach here is just to extendURI::Generic
a bit more to handle require paths.Automated Tests
Added a couple of new tests for the URI extension.