Sourcegraph 5.1 release

With 5.1, Sourcegraph continues to centralize code-related data with support for more code hosts and code metadata. Bringing all of this data into one place helps reduce the complexity of working in a large and distributed software environment and helps developers to spend less time finding what they're looking for and spend more time writing code.

Read on to discover everything included in the 5.1 release.

We also have a number of new updates to Cody, our AI coding assistant, releasing in 5.1. Check out our Cody post for more on how we’re making Cody even more powerful and accurate.

Code Search

Precise cross-repository code navigation for C and C++

Sourcegraph’s latest SCIP indexer, scip-clang, adds precise code navigation for C and C++. C and C++ precise code navigation works for all features supported by scip-clang, such as types, methods, macros, forward declarations, and more. Cross-repository navigation is also supported, so if you reference a function outside of your current repository, you can jump directly to its definition as long as it’s indexed.

Site admins can add precise code navigation to their Sourcegraph instance by running the SCIP indexers as a periodic job in CI infrastructure.

Code graph

Ownership inference

Sourcegraph started ingesting code ownership data, including CODEOWNERS, in 5.0, and moves from experimental to beta in this release. It’s not always easy to assign ownership to code, and sometimes the data is out of date—in 5.1, Sourcegraph also infers code ownership from code and code host metadata (e.g. recent commits). Read more about how we help maintain ownership coverage from our tech lead’s blog post.

Site admins can turn on ownership signals by going to Site Admin > Code Graph > Ownership Signals and enabling recent-contributors and recent-views.

Code graph

Custom repository metadata

Custom repository metadata brings user-defined key-value pairs into the code graph, so users can filter search results based on custom metadata they define. For example, metadata could indicate a repository's maintenance status, allowing users to exclude deprecated or unmaintained libraries from their results.

Repository metadata can be added through the web UI, src-cli and GraphQL API.

Code graph

Complete Perforce support

We see many teams using Perforce in combination with Git, and until recently, they lacked a single experience to search and understand all their code. Now, devs can search and navigate code hosted in either version control systems in Sourcegraph.

Sourcegraph completes support Perforce as a part of 5.1. There is now support for streams and changelists so Perforce code and its version control system components are seamlessly integrated into Sourcegraph’s tools side-by-side with other supported code hosts.

Changelog highlights

  1. Batch changes
    Batch Changes on Gerrit is now available.
  2. Batch changes
    Batch Changes now supports signing commits for PRs created on GitHub via GitHub Apps (bot account), providing extra verification that Batch Changes commits initiate from Sourcegraph.
  3. Code nav
    Improved symbol generation and performance using tree-sitter.
  4. Code nav
    Auto-indexing for TypeScript, JavaScript, Go, Java, Kotlin and Scala are enabled by default.
  5. Admin
    Allow multi-version upgrades with the standard upgrade flow; any instance can upgrade to 5.1+ from any other version (3.20+).
  6. Admin
    src-cli improvement to provide admins better visibility into resource utilization.
  7. Admin
    Sourcegraph Cloud now maintains audit logs retrievable by site admins.
  8. Security
    Switched to using Wolfi for our containers, which is built with security, minimalism, and auditability in mind to decrease the risk of supply chain vulnerabilities.
  9. Security
    Sourcegraph connects to GitHub through GitHub Apps rather than personal access tokens for improved security, control and permissions management for customers.

Get Cody, the AI coding assistant

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