In Sourcegraph 2.9, we focused on improving the code search, rollout, and deployment experience for organizations with 100s and 1,000s of developers and repositories.
We're building Sourcegraph to be the best way for developers to search and browse code, and we're thankful for all the feedback (especially from these large customers) that helped us plan and ship this release.
New in Sourcegraph 2.9:
Ready to install or upgrade? Get Sourcegraph 2.9.
What is Sourcegraph?
Sourcegraph is a self-hosted code search and intelligence tool that helps your team code more productively. With Sourcegraph, developers can find code examples, view references/callers, locate definitions, etc., across all their organization's code in a few seconds with just a few keystrokes. It works great with GitHub, GitHub Enterprise, GitLab, Bitbucket Server, Phabricator, and many other tools.
Sourcegraph runs securely in your own network, takes 5 minutes to install, scales to 1,000s of developers and 10,000s of repositories, and is free to use (with paid upgrades starting at $5/user/month). It pretty quickly becomes one of the most-used tools in an organization, as we hear from teams of 10s–1,000s of developers using Sourcegraph.
You can now install and preconfigure the Sourcegraph Chrome extension for all users in your G Suite organization.
This means that everyone in your organization will get code intelligence in files, diffs, and PRs on GitHub.com, GitHub Enterprise, and Phabricator. After the admin configures G Suite automatic installation of the Chrome extension, each user's Chrome browser will install and configure the Sourcegraph Chrome extension automatically. (It may take a few hours to fully propagate the Chrome settings.) Then all users will see code intelligence like this:
See "Automatically install with G Suite" in the Sourcegraph documentation for more information.
When you search for code on Sourcegraph, it's now easier to refine the results by repository.
After you perform a search, a new Repositories row of filters appears that shows you how many results come from each repository. Clicking on a repository will show you only results from that repository.
To keep search fast, the repositories and counts may be approximate (indicated with a
count:1000 or some other high number to ask for all results to get a complete listing of matched repositories.
Try it on Sourcegraph.com: search for repogroup:sample open.
It's now easier to work with searches with many results and to share search links with teammates:
+after the result count) will be sorted in a stable way. If you reload the page or share the link with someone else, the list of results will be the exact same (assuming the underlying repository contents don't change in the meantime).
+after the result count), you can click the “Show more” to look for more results or you can manually specify the number of results to search for by adding
count:Nto your search query.
&at=N). So, if you reload or share the link, the scroll position will be preserved.
One neat use case this helps with is large-scale refactoring, such as renaming symbols or deleting code from many repositories. Just perform a Sourcegraph search that matches the to-be-refactored code, and post the search link in an issue or share it with the team that's working on the refactor. When the search has no more results, you know you're done!
Try it on Sourcegraph.com: search for repogroup:sample x.
Sourcegraph’s code view and tooltips were rewritten from the ground up to be smoother and to support more parts of the Language Server Protocol.
Many of our customers have switched from Oracle's OpenGrok to Sourcegraph for code search. We wrote up a migration guide to make this easier for other organizations: "Migrating from Oracle OpenGrok to Sourcegraph for code search".
src CLI tool makes it easy to use the Sourcegraph API from the command line. It now supports:
src repos -h
src users -h
src orgs -h
src api -h
To install it, run
go get -u github.com/sourcegraph/src-cli/cmd/src or download a release.
See the Sourcegraph changelog for a list of all changes in this release.