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

Use rattler index crate instead of local index functionality #489

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ serde_yaml = "0.9.30"
rattler = { version = "0.16.1", default-features = false }
rattler_conda_types = { version = "0.16.1", default-features = false }
rattler_digest = { version = "0.16.1", default-features = false }
rattler_index = { version = "0.16.1", default-features = false }
rattler_networking = { version = "0.16.1", default-features = false }
rattler_repodata_gateway = { version = "0.16.1", default-features = false, features = [
"sparse",
Expand Down
7 changes: 4 additions & 3 deletions src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use std::process::{Command, Stdio};

use itertools::Itertools;
use miette::IntoDiagnostic;
use rattler_index::index;
use rattler_shell::shell;

use crate::env_vars::write_env_script;
Expand All @@ -23,7 +24,7 @@ use crate::packaging::{package_conda, record_files};
use crate::recipe::parser::{ScriptContent, TestType};
use crate::render::resolved_dependencies::{install_environments, resolve_dependencies};
use crate::source::fetch_sources;
use crate::{index, package_test, tool_configuration};
use crate::{package_test, tool_configuration};

const BASH_PREAMBLE: &str = r#"
## Start of bash preamble
Expand Down Expand Up @@ -207,7 +208,7 @@ pub async fn run_build(
) -> miette::Result<PathBuf> {
let directories = &output.build_configuration.directories;

index::index(
index(
&directories.output_dir,
Some(&output.build_configuration.target_platform),
)
Expand Down Expand Up @@ -337,7 +338,7 @@ pub async fn run_build(
fs::remove_dir_all(&directories.build_dir).into_diagnostic()?;
}

index::index(
index(
&directories.output_dir,
Some(&output.build_configuration.target_platform),
)
Expand Down
195 changes: 0 additions & 195 deletions src/index.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ pub mod variant_config;

mod env_vars;
pub mod hash;
mod index;
mod linux;
mod macos;
mod packaging;
Expand Down
5 changes: 3 additions & 2 deletions src/package_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@ use rattler_conda_types::{
package::{ArchiveIdentifier, PathsJson},
MatchSpec, Platform,
};
use rattler_index::index;
use rattler_shell::{
activation::{ActivationError, ActivationVariables, Activator},
shell::{Shell, ShellEnum, ShellScript},
};

use crate::{
env_vars, index,
env_vars,
recipe::parser::{CommandsTestRequirements, PackageContents, PythonTest},
render::solver::create_environment,
tool_configuration,
Expand Down Expand Up @@ -270,7 +271,7 @@ pub async fn run_test(package_file: &Path, config: &TestConfiguration) -> Result
)?;

// index the temporary channel
index::index(tmp_repo.path(), Some(&target_platform))?;
index(tmp_repo.path(), Some(&target_platform))?;

let cache_dir = rattler::default_cache_dir()?;

Expand Down
Loading