Sourcegraph 2.7: code intelligence in pull requests and commit diffs
Sourcegraph 2.7 ships today, with tons of new features and improvements to help your team build better software. Get code intelligence in seconds with no setup, view diffs with code intelligence directly in Sourcegraph, and get more information when finding references. This release comes with many more improvements and bug fixes.
Sourcegraph gives your team code intelligence and search across all of your code--even up to 10,000s of repositories. It runs securely in your own network, takes 5 minutes to install, and is free to use (with paid upgrades starting at $5/user/month).
Ready to install or upgrade? Install Sourcegraph 2.7
Key highlights of Sourcegraph 2.7:
- Code intelligence in seconds, with no setup
- Diffs with code intelligence in Phabricator and on Sourcegraph itself
- "Find implementations" support
- Improved references panel
- Search from your browser's address bar
- Access tokens for API clients
- Analytics improvements for site admins
From zero to code intelligence in seconds
We’ve drastically simplified getting code intelligence up and running. When viewing a repository, the relevant language servers are now automatically enabled. For example, visiting a Go repository will now automatically download and run the Docker container for Go code intelligence. (This change does not affect cluster deployments.)
The new code intelligence admin panel allows you to view and manage language servers. It lets you enable, disable, update, and restart language servers at the click of a button. For cluster deployments, it shows the current status of language servers. Click Code intelligence in the site admin area to manage code intelligence.
Code intelligence in Phabricator diffs
You can now get code intelligence in Phabricator diffs. You can roll it out to your entire organization by running a single install script, without needing every person to install the browser extension. Read the Phabricator integration documentation for full instructions.
Diffs in Sourcegraph, with code intelligence
You can now view and browse diffs with code intelligence directly in Sourcegraph. You can also view a repository’s Git branches, tags, and commits, and compare revisions. To view and browse a diff, click Compare and enter the relevant revisions or click a commit hash anywhere in the UI.
Find implementations and improved references panel
Sourcegraph can now answer "Which types implement this interface?" for any extension that supports the feature, for example Go. After clicking find references on an interface, click the Implementations tab in the references panel to view all implementations.
We’ve also improved the references panel for all languages to also show the full docstring, all definitions, and external references grouped by calling repository.
The Sourcegraph browser extension now ships with easier access to code search from your browser bar. In your browser bar, type
src<space> in Chrome or Firefox to activate Sourcegraph search.
Access tokens for API clients
Users (and site admins) may now create and manage access tokens to authenticate API clients. Access tokens are currently only supported when using the builtin and http-header authentication providers (not OpenID or SAML). Click Access tokens in your user profile menu to create and manage your tokens. The site configuration option auth.disableAccessTokens disables this new feature.
Better analytics for site admins
The site admin analytics page will now display the number of code intelligence actions each user has made, including hovers, jump to definitions, and find references, on the Sourcegraph instance or in a code host integration.
See the Sourcegraph changelog for a list of all changes in this release.
Ready to upgrade? Install Sourcegraph 2.7.
About the author
Quinn Slack is the CEO and co-founder of Sourcegraph, the code intelligence platform for dev teams and making coding more accessible to more people. Prior to Sourcegraph, Quinn co-founded Blend Labs, an enterprise technology company dedicated to improving home lending and was an egineer at Palantir, where he created a technology platform to help two of the top five U.S. banks recover from the housing crisis. Quinn has a BS in Computer Science from Stanford, you can chat with him on Twitter @sqs.