Dependencies search beta

Dependencies search is a code search feature that lets you search through the dependencies of your repositories.

Setup

Configure a package host connection for each kind of dependency you want to search over.

Use cases

Resolve an incident faster by quickly finding where an error comes from and then understanding the code around it by leveraging code intelligence.

r:deps(^github\.com/sourcegraph/[email protected]) Observable cannot be called as a function

Search only npm dependencies:

r:deps(^github\.com/sourcegraph/[email protected]) r:^npm throw

Search only Go dependencies:

r:deps(^github\.com/sourcegraph/[email protected]) r:^go fmt.Println

Compatibility

The following table outlines the kinds of dependency repositories that dependency search supports and how it finds those dependencies in your repositories.

Kind How Direct Transitive
npm package-lock.json
npm lsif-typescript uploads
npm yarn.lock
Go go.mod ✅ with Go >= 1.17 go.mod files
Go lsif-go uploads
JVM gradle.lockfile
JVM pom.xml
Python poetry.lock

Reference