Skip to content

Commit

Permalink
Move URI extension to indexer (#2915)
Browse files Browse the repository at this point in the history
### Motivation

Move our URI extension to the indexer, so that we can get rid of `IndexablePath` and use URIs only (which is the first step to address #1908).

### Implementation

This PR just moves the extension to the indexer.
  • Loading branch information
vinistock authored Nov 27, 2024
1 parent e5e7d97 commit a6842f1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions lib/ruby_indexer/ruby_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require "yaml"
require "did_you_mean"

require "ruby_indexer/lib/ruby_indexer/uri"
require "ruby_indexer/lib/ruby_indexer/indexable_path"
require "ruby_indexer/lib/ruby_indexer/declaration_listener"
require "ruby_indexer/lib/ruby_indexer/reference_finder"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

require "test_helper"

module RubyLsp
module RubyIndexer
class URITest < Minitest::Test
def test_from_path_on_unix
uri = URI::Generic.from_path(path: "/some/unix/path/to/file.rb")
Expand Down
1 change: 0 additions & 1 deletion lib/ruby_lsp/internal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
require "ruby-lsp"
require "ruby_lsp/base_server"
require "ruby_indexer/ruby_indexer"
require "core_ext/uri"
require "ruby_lsp/utils"
require "ruby_lsp/static_docs"
require "ruby_lsp/scope"
Expand Down
2 changes: 1 addition & 1 deletion lib/ruby_lsp/scripts/compose_bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def compose(raw_initialize)
require_relative "../setup_bundler"
require "json"
require "uri"
require_relative "../../core_ext/uri"
require "ruby_indexer/lib/ruby_indexer/uri"

initialize_request = JSON.parse(raw_initialize, symbolize_names: true)
workspace_uri = initialize_request.dig(:params, :workspaceFolders, 0, :uri)
Expand Down

0 comments on commit a6842f1

Please sign in to comment.