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

feat: refactor archive type #922

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
34 changes: 3 additions & 31 deletions Cargo.lock

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

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ pre-build = [
clap-markdown = { git = "https://github.com/ruben-arts/clap-markdown", branch = "main"}


# rattler = { path = "../rattler/crates/rattler" }
# rattler_conda_types = { path = "../rattler/crates/rattler_conda_types" }
# rattler_digest = { path = "../rattler/crates/rattler_digest" }
# rattler_index = { path = "../rattler/crates/rattler_index" }
# rattler_networking = { path = "../rattler/crates/rattler_networking" }
# rattler_repodata_gateway = { path = "../rattler/crates/rattler_repodata_gateway" }
# rattler_shell = { path = "../rattler/crates/rattler_shell" }
# rattler_solve = { path = "../rattler/crates/rattler_solve" }
# rattler_virtual_packages = { path = "../rattler/crates/rattler_virtual_packages" }
# rattler_package_streaming = { path = "../rattler/crates/rattler_package_streaming" }
rattler = { path = "../rattler-1/crates/rattler" }
rattler_conda_types = { path = "../rattler-1/crates/rattler_conda_types" }
rattler_digest = { path = "../rattler-1/crates/rattler_digest" }
rattler_index = { path = "../rattler-1/crates/rattler_index" }
rattler_networking = { path = "../rattler-1/crates/rattler_networking" }
rattler_repodata_gateway = { path = "../rattler-1/crates/rattler_repodata_gateway" }
rattler_shell = { path = "../rattler-1/crates/rattler_shell" }
rattler_solve = { path = "../rattler-1/crates/rattler_solve" }
rattler_virtual_packages = { path = "../rattler-1/crates/rattler_virtual_packages" }
rattler_package_streaming = { path = "../rattler-1/crates/rattler_package_streaming" }
#clap-markdown = { path = "../clap-markdown" }
9 changes: 7 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ pub mod hash;
mod linux;
mod macos;
mod post_process;
pub mod rebuild;
pub mod recipe_generator;
mod unix;
pub mod upload;
Expand All @@ -39,6 +38,7 @@ use metadata::Output;
use miette::{IntoDiagnostic, WrapErr};
use petgraph::{algo::toposort, graph::DiGraph, visit::DfsPostOrder};
use rattler_conda_types::{package::ArchiveType, Channel, ChannelConfig, Platform};
use rattler_package_streaming::archive::Archive;
use rattler_solve::{ChannelPriority, SolveStrategy};
use recipe::parser::Dependency;
use std::{
Expand Down Expand Up @@ -416,7 +416,12 @@ pub async fn rebuild_from_args(
// and then run the rendered recipe with the same arguments as the original build
let temp_folder = tempfile::tempdir().into_diagnostic()?;

rebuild::extract_recipe(&args.package_file, temp_folder.path()).into_diagnostic()?;
let path = PathBuf::from("info/recipe");
let archive = Archive::try_from(args.package_file).into_diagnostic()?;

archive
.extract_a_folder(&path, temp_folder.path())
.into_diagnostic()?;

let temp_dir = temp_folder.into_path();

Expand Down
79 changes: 0 additions & 79 deletions src/rebuild.rs

This file was deleted.