pub fn with_package_discovery<P2: PackageDiscoveryBuilder>(
        self,
        discovery: P2,
    ) -> PackageGraphBuilder<'a, P2> {
        PackageGraphBuilder {
            repo_root: self.repo_root,
            root_package_json: self.root_package_json,
            is_single_package: self.is_single_package,
            package_jsons: self.package_jsons,
            lockfile: self.lockfile,
            package_discovery: discovery,
        }
    }
Set the package discovery strategy to use. Note that whatever strategy
selected here will be wrapped in a `CachingPackageDiscovery` to
prevent unnecessary work during building.
crates/turborepo-repository/src/package_graph/builder.rs