GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sourcegraph/scip-ruby: A SCIP indexer for Ruby, powered by Sorbet

BranchesTags
Open more actions menu

Latest commit

 

History

13,808 Commits
13,808 Commits

Folders and files

NameName
Last commit message
Last commit date
.bazelversion_checksums
.bazelversion_checksums
 
 
.buildkite
.buildkite
 
 
.github
.github
 
 
.sorbet-buildkite
.sorbet-buildkite
 
 
.vscode
.vscode
 
 
ast
ast
 
 
cfg
cfg
 
 
common
common
 
 
core
core
 
 
definition_validator
definition_validator
 
 
docs
docs
 
 
emscripten
emscripten
 
 
gems
gems
 
 
hashing
hashing
 
 
infer
infer
 
 
local_vars
local_vars
 
 
main
main
 
 
namer
namer
 
 
packager
packager
 
 
parser
parser
 
 
payload
payload
 
 
proto
proto
 
 
rbi
rbi
 
 
rbs
rbs
 
 
resolver
resolver
 
 
rewriter
rewriter
 
 
scip_indexer
scip_indexer
 
 
sorbet_version
sorbet_version
 
 
test
test
 
 
third_party
third_party
 
 
tools
tools
 
 
vscode_extension
vscode_extension
 
 
website
website
 
 
.bazelrc
.bazelrc
 
 
.bazelversion
.bazelversion
 
 
.clang-format
.clang-format
 
 
.clang-tidy
.clang-tidy
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.lldbinit
.lldbinit
 
 
.ruby-version
.ruby-version
 
 
ACKNOWLEDGEMENTS.md
ACKNOWLEDGEMENTS.md
 
 
BUILD
BUILD
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
Dockerfile.autoindex
Dockerfile.autoindex
 
 
Dockerfile.base
Dockerfile.base
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
WORKSPACE
WORKSPACE
 
 
bazel
bazel
 
 
lldbinit.py
lldbinit.py
 
 
sorbet-README.md
sorbet-README.md
 
 
xbrew
xbrew
 
 

Repository files navigation

scip-ruby

Experimental SCIP indexer for Ruby, enabling precise code navigation for Ruby — Go to definition, Find references, hover docs etc. – in Sourcegraph.

Example showing cross-file Find references for a type from the shopify-api-ruby codebase

If you have any questions, bug reports, feature requests or feedback, please file an issue. The most common indexing workflows are discussed below; you can also consult the CLI reference docs for more information.

Supported Configurations

scip-ruby builds on top of the Sorbet type-checker. It is primarily meant for use in projects which have started adopting Sorbet. Higher Sorbet adoption (# typed: true or higher) is likely to lead to a better code navigation experience. However, scip-ruby can also index # typed: false files on a best-effort basis. Like Sorbet, scip-ruby treats files without a # typed: sigil as implicitly being # typed: false.

Currently, we have gems and binaries available for x86_64 Linux and arm64 macOS.

Quick Start

This section covers the easiest way to use scip-ruby: as a gem, which includes a platform-specific scip-ruby binary and uses that for indexing. Alternately, you can directly download a binary and index your code.

First-time setup

If you have a .gemspec file, use add_development_dependency:

Gem::Specification.new do |spec|
  # ... other stuff ...
  spec.add_development_dependency("scip-ruby")
end

Otherwise, add this line to your Gemfile:

gem 'scip-ruby', require: false, :group => :development

After either of those steps, run bundle install to download and install fetch scip-ruby.

Generate an index

Run scip-ruby along with some information about your gem.

  • If you have a sorbet/config file, that will be picked up automatically to determine which files to index.
    bundle exec scip-ruby
  • If you don't have a sorbet/config file, add an extra path argument to index all files in the project.
    bundle exec scip-ruby .

These commands will output a SCIP index to index.scip. Any other needed information will be inferred from directory layout. For customizing how scip-ruby interprets your configuration, see the CLI reference.

The SCIP index can be uploaded to a Sourcegraph instance using the Sourcegraph CLI's upload command.

If you're curious about the internals of the index, such as which files were indexed, check out the SCIP CLI and the SCIP development docs.

Download binary and index

You can download a release binary and run it directly, similar to invoking Sorbet.

ARCH="$(uname -m)" \
OS="$(uname -s | tr '[:upper:]' '[:lower:]')" \
bash -c 'curl -L "https://github.com/sourcegraph/scip-ruby/releases/latest/download/scip-ruby-$ARCH-$OS" -o scip-ruby' && \
chmod +x scip-ruby

# If using in CI with 'set -e', make sure to wrap the
# scip-ruby invocation in 'set +e' followed by 'set -e'
# so that indexing failures are non-blocking.
./scip-ruby

The generated index can be uploaded to a Sourcegraph instance using the Sourcegraph CLI (v3.43.0 or newer). Typically, the command looks like:

SRC_ACCESS_TOKEN="your token" SRC_ENDPOINT="url for Sourcegraph instance" src code-intel upload -file=/path/to/index.scip

For more details, see the Sourcegraph CLI docs.

Building from source for indexing

See the Contributing docs for build instructions. Once the scip-ruby binary is built, you can index it as described above.

Contributing

See the Contributing docs.

About

A SCIP indexer for Ruby, powered by Sorbet

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

23 stars

Watchers

5 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.