Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove unused fetch_sparse_repodata #1411

Merged
merged 2 commits into from
May 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 2 additions & 29 deletions src/project/repodata.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
use crate::project::has_features::HasFeatures;
use crate::project::Environment;
use crate::{config, project::Project, repodata};
use indexmap::IndexMap;
use rattler_conda_types::{Channel, Platform};
use rattler_repodata_gateway::{sparse::SparseRepoData, ChannelConfig, Gateway, SourceConfig};
use crate::{config, project::Project};
use rattler_repodata_gateway::{ChannelConfig, Gateway, SourceConfig};
use std::path::PathBuf;
use std::sync::Arc;

impl Project {
// TODO: Remove this function once everything is migrated to the new environment system.
pub async fn fetch_sparse_repodata(
&self,
) -> miette::Result<IndexMap<(Channel, Platform), SparseRepoData>> {
self.default_environment().fetch_sparse_repodata().await
}

/// Returns the [`Gateway`] used by this project.
pub fn repodata_gateway(&self) -> &Arc<Gateway> {
self.repodata_gateway.get_or_init(|| {
Expand Down Expand Up @@ -51,19 +40,3 @@ impl Project {
})
}
}

impl Environment<'_> {
pub async fn fetch_sparse_repodata(
&self,
) -> miette::Result<IndexMap<(Channel, Platform), SparseRepoData>> {
let channels = self.channels();
let platforms = self.platforms();
repodata::fetch_sparse_repodata(
channels,
platforms,
self.project().authenticated_client(),
Some(self.project().config()),
)
.await
}
}
Loading