dependencies api: Move existing lockfile parser behind codeintel API
Created by: efritz
This PR moves the code related to dependency/lockfile parsing within search's repository resolver into its own package that can be controlled by code intelligence. The code intel data platform has already started storing like data and we can correlate/supplement lockfile intelligence easily. Fixes #31637 (closed).
This is good practice to start forming code intel's internal API shape into something actually usable by other teams.
This is a work in progress:
-
Found good boundary point in dependencies
function between search/codeintel -
Moved codeintel code into a new struct DependenciesResolver
-
Updated search's repository resolver to call DependenciesResolver
to get dependencies. Note that this resolver is not yet initialized so will NPE at runtime; see next point. -
Find out how to initialize a single DependenciesResolver
at app startup and pass it around to the call sites. This is trickier for me since search and code intel code styles clash at this point. We'd like to have a single instance per service (not one created within a particular query) so that we can do things like share caches behind the interface boundary. -
Find out additional unknowns and expand this list as needed
Test plan
Will test locally/manually.