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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
# Sorbet

NOTE: This code is in Sourcegraph's fork of Sorbet, modified to add support
for emitting SCIP indexes. See scip-ruby.md for details on running tests etc.
The original README follows below.
for emitting SCIP indexes. See [scip-ruby.md](./scip-ruby.md) for details
on running tests etc. The original README follows below.

---

Expand Down
25 changes: 25 additions & 0 deletions scip-ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,28 @@ Updating snapshots
```
./bazel test //test/scip:update --config=dbg
```

## Debugging

So far, I've mostly been using print debugging
(along with minimized test cases)
since I find it more helpful to see a bunch of output
along with the control flow graph all at once.

Typically, I'll copy over the minimized code
to the root and run:

```
./bazel build //main:scip-ruby --config=dbg && ./bazel-out/darwin-dbg/bin/main/scip-ruby tmp.rb -p cfg-text --index-file index.scip
```

Alternately, it may be useful to create a `tmp.rb`
file under the `test/scip/snapshots/` directory
(it will be gitignored) and run:

```
# Check
./bazel test //test/scip:tmp --config=dbg
# View output
./bazel test //test/scip:update_tmp --config=dbg && cat test/scip/snapshots/tmp.snapshot.rb
```