Skip to content
Snippets Groups Projects

LSIF Typed: add command-line tool to emit Graph

Created by: olafurpg

This PR implements two separate, but complementary, components:

  • LSIF Testing DSL: this DSL makes it possible to write minimized test examples that stress all features of LSIF, including features like cross-repo implementations. Until now, we have usually written tests against lsif-go/lsif-java/lsif-node but that approach is problematic because those language may not use all LSIF features. Also, even the smallest Go/Java/JS program may generate a modestly large LSIF dump to stress a corner case. With this new testing DSL, we can write minimal code examples that stress precisely a specific behavior of LSIF.
  • LSIF Typed to Graph command-line tool: this command-line tool takes as input the path to an LSIF Typed payload and prints to stdout the converted LSIF graph output, which can be piped into a dump.lsif file and uploaded to Sourcegraph via src lsif upload.

A good portion of the diff includes auto-generated files for the testing DSL (tree-sitter parser) and the generated snapshot tests. The tree-sitter generated files should be collapsed by default in the diff since the PR includes .gitattributes files that mark those files as generated (thank you @varungandhi-src for the suggestion :pray: )

Fixes https://github.com/sourcegraph/sourcegraph/issues/30894

Fixes https://github.com/sourcegraph/sourcegraph/issues/31173

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading