Sourcegraph 3.37 release

Sourcegraph 3.37 is now available! For this release, we introduced:

Track what really matters to you and your team with Code Insights

Code Insights is now generally available. Code Insights transforms any search query into customizable, visual dashboards in seconds. Code Insights reveals high-level information about your codebase, based on both how your code changes over time and its current state.

If you’re already using Sourcegraph, upgrade to 3.37 for a limited trial of Code Insights or reach out to your account team to purchase access to the full version.

Code Intelligence LSIF indexing time has improved 30x (from 15m to 30s)

LSIF index processing just got a whole lot faster, so you can upload your indexes and start utilizing precise Code Intelligence immediately. Previously, certain LSIF indexes, especially for Javascript and Typescript, could take over 30 minutes to process. This meant that a long queue would build up with frequent uploads, such as those from a CI job that runs on every commit on a development branch. Now, most indexes should be processed in a few seconds instead of minutes so that you can access precise Code Intelligence soon after uploading an index.

Comparative chart before and after processing improvements.

The symbols sidebar also got a significant performance boost. Previously, the symbols sidebar would search for symbols in the whole directory tree, even if you were only looking at a subdirectory or file, which would cause it to time out and show an error message on big monorepos. Now prefix queries like ^src/app are better optimized and subdirectory searches are much faster and less likely to time out.

Comparative chart before and after symbol improvements.

Share Notebooks with your organization

Notebooks are now shareable within organizations. Previously, you could only share Notebooks with your entire instance (or share them publicly, in the case of Sourcegraph Cloud). This update allows you to create Notebooks with specific relevance to your organization, such as documentation of preferred engineering patterns or anti-patterns. Your organization's shared Notebooks will now show up in their own tabs on the Notebooks home page.

Image of Notebooks sharing modal.

Import and export Notebooks as Markdown

Notebooks can now be created by uploading a Markdown file, so if you're already working with Markdown documentation files, you can simply upload those files to add Sourcegraph snippets and turn them into full-fledged Notebooks. You can also export Notebooks to Markdown, allowing you to turn Sourcegraph Notebooks into repo-based Markdown files.

Create search contexts with the new UI

The search contexts creation UI has received visual tweaks, making it easier to understand if you're using search queries or JSON to define your contexts. We've also added guidance on valid expressions for query-based contexts to make the creation process clearer.

Screenshot of search contexts configuration UI.

Upgrading Sourcegraph is now easier with the new migrator service

Previously, failed database migrations were a common cause of pain when upgrading Sourcegraph. We've introduced a new migrator service and made several changes to make these database failures far less common. You can read more here.

Changelog highlights

  1. Code Insights
    Code Insights is now Generally Available. Track anything that can be expressed with a Sourcegraph search query: migrations, package use, version adoption, code smells, codebase size, and much more, across 1,000s of repositories.
  2. Search
    Code in search results is now selectable for easier copying and reuse. You can still click on the code to open the corresponding file.
  3. Search
    Query-based search contexts are now enabled by default as a beta feature, making it easier to scope queries for monorepos or large codebases.
  4. API
    GraphQL API: The order of events returned by `MonitorTriggerEventConnection` has been reversed so newer events are returned first. The `after` parameter has been modified accordingly to return events older than the one specified, to allow for pagination.
  5. Code Intelligence
    Fixed a race condition in the precise Code Intelligence upload expiry process that prematurely expired new uploads.
  6. Code Intelligence
    Fixed performance issue in LSIF upload processing, reducing the latency between uploading an LSIF index and accessing precise Code Intelligence in the UI.

Get Cody, the AI coding assistant

Cody makes it easy to write, fix, and maintain code.