Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .github/workflows/indexing.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ Sorbet/TrueSigil:
Enabled: true
Include:
- "test/**/*.rb"
- "lib/ruby_indexer/test/**/*.rb"
- "lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb"
- "lib/ruby_lsp/scripts/compose_bundle.rb"
- "lib/ruby_lsp/test_reporters/test_unit_reporter.rb"
Exclude:
Expand All @@ -64,9 +62,7 @@ Sorbet/StrictSigil:
Exclude:
- "**/*.rake"
- "test/**/*.rb"
- "lib/ruby_indexer/test/**/*.rb"
- "lib/ruby-lsp.rb"
- "lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb"
- "lib/ruby_lsp/scripts/compose_bundle.rb"
- "lib/ruby_lsp/test_helper.rb"
- "lib/ruby_lsp/test_reporters/test_unit_reporter.rb"
Expand Down
2 changes: 0 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Its parts are:

- `ruby-lsp` gem: language server implementation and extra custom functionality to support the VS Code extension. This
is the top level of the repository
- Ruby code indexer: static analysis engine to support features like go to definition, completion and workspace
symbols. This is entirely implemented inside `lib/ruby_indexer`
- Companion VS Code extension that includes several integrations. The extension is entirely implemented in the `vscode`
directory
- Jekyll static documentation site. Fully implemented in `jekyll`
Expand Down
10 changes: 1 addition & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@ Rake::TestTask.new(:test) do |t|
t.test_files = FileList["test/**/*_test.rb"].exclude("test/fixtures/prism/**/*")
end

namespace :test do
Rake::TestTask.new(:indexer) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["lib/ruby_indexer/test/**/*_test.rb"]
end
end

require "rubocop/rake_task"

RuboCop::RakeTask.new

task default: ["test:indexer", :test]
task default: :test
46 changes: 0 additions & 46 deletions exe/ruby-lsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ parser = OptionParser.new do |opts|
options[:debug] = true
end

opts.on("--time-index", "Measure the time it takes to index the project") do
options[:time_index] = true
end

opts.on("--doctor", "Run troubleshooting steps") do
options[:doctor] = true
end

opts.on("--use-launcher", "[EXPERIMENTAL] Use launcher mechanism to handle missing dependencies gracefully") do
options[:launcher] = true
end
Expand Down Expand Up @@ -110,44 +102,6 @@ if options[:debug]
end
end

if options[:time_index]
index = RubyIndexer::Index.new

time_start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
index.index_all
elapsed_time = Process.clock_gettime(Process::CLOCK_MONOTONIC) - time_start

entries = index.instance_variable_get(:@entries)
entries_by_entry_type = entries.values.flatten.group_by(&:class)

puts <<~MSG
Ruby LSP v#{RubyLsp::VERSION}: Indexing took #{elapsed_time.round(5)} seconds and generated:
- #{entries_by_entry_type.sort_by { |k, _| k.to_s }.map { |k, v| "#{k.name.split("::").last}: #{v.size}" }.join("\n- ")}
MSG
return
end

if options[:doctor]
index = RubyIndexer::Index.new

if File.exist?(".index.yml")
begin
config = YAML.parse_file(".index.yml").to_ruby
rescue => e
abort("Error parsing config: #{e.message}")
end
index.configuration.apply_config(config)
end

puts "Globbing for indexable files"

index.configuration.indexable_uris.each do |uri|
puts "indexing: #{uri}"
index.index_file(uri)
end
return
end

server = RubyLsp::Server.new

# Ensure all output goes out stderr by default to allow puts/p/pp to work
Expand Down
15 changes: 0 additions & 15 deletions exe/ruby-lsp-check
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@ ensure
end
puts "\n"

# Indexing
puts "Verifying that indexing executes successfully. This may take a while..."

index = RubyIndexer::Index.new
uris = index.configuration.indexable_uris

uris.each_with_index do |uri, i|
index.index_file(uri)
rescue => e
errors[uri.full_path] = e
ensure
print("\033[M\033[0KIndexed #{i + 1}/#{uris.length}") unless ENV["CI"]
end
puts "\n"

if errors.empty?
puts "All operations completed successfully!"
exit
Expand Down
Loading
Loading