From d6a7a8a44a3a10a2edd62848685ab594d8b084a7 Mon Sep 17 00:00:00 2001
From: Bas Zalmstra <zalmstra.bas@gmail.com>
Date: Thu, 6 Jul 2023 10:47:12 +0200
Subject: [PATCH 1/4] feat: switch to new solver backend implementation

---
 Cargo.lock                                    | 38 ++++++++++-------
 Cargo.toml                                    |  2 +-
 src/cli/add.rs                                | 15 ++++---
 src/cli/global/install.rs                     |  8 ++--
 src/environment.rs                            | 10 ++---
 ...ect__manifest__test__dependency_types.snap | 14 ++-----
 ...ject__manifest__test__target_specific.snap | 21 +++-------
 ...pixi__project__tests__dependency_sets.snap | 21 +++-------
 ...roject__tests__dependency_target_sets.snap | 42 ++++++-------------
 ...get_minimal_virtual_packages.linux-64.snap | 15 +++----
 tests/common/package_database.rs              |  5 ++-
 11 files changed, 77 insertions(+), 114 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 80d9b3067..99a3256d7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2389,6 +2389,19 @@ version = "0.2.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"
 
+[[package]]
+name = "libsolv-sys"
+version = "0.1.0"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
+dependencies = [
+ "anyhow",
+ "cc",
+ "cfg-if",
+ "cmake",
+ "libc",
+ "libz-sys",
+]
+
 [[package]]
 name = "libz-sys"
 version = "1.1.9"
@@ -3232,7 +3245,7 @@ dependencies = [
 [[package]]
 name = "rattler"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "anyhow",
  "apple-codesign",
@@ -3273,7 +3286,7 @@ dependencies = [
 [[package]]
 name = "rattler_conda_types"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "chrono",
  "fxhash",
@@ -3301,7 +3314,7 @@ dependencies = [
 [[package]]
 name = "rattler_digest"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "blake2",
  "digest 0.10.7",
@@ -3316,7 +3329,7 @@ dependencies = [
 [[package]]
 name = "rattler_macros"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "quote",
  "syn 2.0.22",
@@ -3325,7 +3338,7 @@ dependencies = [
 [[package]]
 name = "rattler_networking"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "anyhow",
  "dirs 5.0.1",
@@ -3342,7 +3355,7 @@ dependencies = [
 [[package]]
 name = "rattler_package_streaming"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "bzip2",
  "chrono",
@@ -3365,7 +3378,7 @@ dependencies = [
 [[package]]
 name = "rattler_repodata_gateway"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "anyhow",
  "async-compression",
@@ -3403,7 +3416,7 @@ dependencies = [
 [[package]]
 name = "rattler_shell"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "enum_dispatch",
  "indexmap 1.9.3",
@@ -3420,15 +3433,12 @@ dependencies = [
 [[package]]
 name = "rattler_solve"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "anyhow",
- "cc",
- "cfg-if",
- "cmake",
  "hex",
  "libc",
- "libz-sys",
+ "libsolv-sys",
  "rattler_conda_types",
  "rattler_digest",
  "serde",
@@ -3441,7 +3451,7 @@ dependencies = [
 [[package]]
 name = "rattler_virtual_packages"
 version = "0.5.0"
-source = "git+https://github.com/mamba-org/rattler?branch=main#f3eddf019fdace8f3c0d46d36130481ebe06e970"
+source = "git+https://github.com/mamba-org/rattler?branch=main#dfaf4b0ba99b2d4c37a2bde5333f3c64866adb09"
 dependencies = [
  "cfg-if",
  "libloading",
diff --git a/Cargo.toml b/Cargo.toml
index 2b3643c9e..8cc1a75b1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -37,7 +37,7 @@ rattler_conda_types = { default-features = false, git = "https://github.com/mamb
 rattler_networking = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main" }
 rattler_repodata_gateway = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main", features = ["sparse"] }
 rattler_shell = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main", features = ["sysinfo"] }
-rattler_solve = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main" }
+rattler_solve = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main", features = ["libsolv-sys"] }
 rattler_virtual_packages = { default-features = false, git = "https://github.com/mamba-org/rattler", branch = "main" }
 #rattler = { default-features = false, path="../rattler/crates/rattler" }
 #rattler_conda_types = { default-features = false, path="../rattler/crates/rattler_conda_types" }
diff --git a/src/cli/add.rs b/src/cli/add.rs
index 840ad3e02..24e468aa3 100644
--- a/src/cli/add.rs
+++ b/src/cli/add.rs
@@ -11,7 +11,7 @@ use rattler_conda_types::{
     version_spec::VersionOperator, MatchSpec, NamelessMatchSpec, Platform, Version, VersionSpec,
 };
 use rattler_repodata_gateway::sparse::SparseRepoData;
-use rattler_solve::{LibsolvRepoData, SolverBackend};
+use rattler_solve::{libsolv_sys, SolverImpl};
 use std::collections::HashMap;
 use std::path::PathBuf;
 
@@ -212,9 +212,7 @@ pub fn determine_best_version(
             .map(|(name, spec)| MatchSpec::from_nameless(spec.clone(), Some(name.clone())))
             .collect(),
 
-        available_packages: available_packages
-            .iter()
-            .map(|records| LibsolvRepoData::from_records(records)),
+        available_packages: &available_packages,
 
         virtual_packages: get_minimal_virtual_packages(platform)
             .into_iter()
@@ -227,12 +225,17 @@ pub fn determine_best_version(
         pinned_packages: vec![],
     };
 
-    let records = rattler_solve::LibsolvBackend.solve(task)?;
+    let records = libsolv_sys::Solver.solve(task)?;
 
     // Determine the versions of the new packages
     Ok(records
         .into_iter()
         .filter(|record| new_specs.contains_key(&record.package_record.name))
-        .map(|record| (record.package_record.name, record.package_record.version))
+        .map(|record| {
+            (
+                record.package_record.name,
+                record.package_record.version.into(),
+            )
+        })
         .collect())
 }
diff --git a/src/cli/global/install.rs b/src/cli/global/install.rs
index fa046e5a5..a73123005 100644
--- a/src/cli/global/install.rs
+++ b/src/cli/global/install.rs
@@ -15,7 +15,7 @@ use rattler_shell::{
     shell::Shell,
     shell::ShellEnum,
 };
-use rattler_solve::{LibsolvRepoData, SolverBackend};
+use rattler_solve::{libsolv_sys, SolverImpl};
 use std::{
     path::{Path, PathBuf},
     str::FromStr,
@@ -219,9 +219,7 @@ pub async fn execute(args: Args) -> anyhow::Result<()> {
     // Construct a solver task that we can start solving.
     let task = rattler_solve::SolverTask {
         specs: vec![package_matchspec],
-        available_packages: available_packages
-            .iter()
-            .map(|records| LibsolvRepoData::from_records(records)),
+        available_packages: &available_packages,
 
         virtual_packages: rattler_virtual_packages::VirtualPackage::current()?
             .iter()
@@ -234,7 +232,7 @@ pub async fn execute(args: Args) -> anyhow::Result<()> {
     };
 
     // Solve it
-    let records = rattler_solve::LibsolvBackend.solve(task)?;
+    let records = libsolv_sys::Solver.solve(task)?;
 
     // Create the binary environment prefix where we install or update the package
     let bin_prefix = BinEnvDir::create(&package_name).await?;
diff --git a/src/environment.rs b/src/environment.rs
index f9c2b4925..9819da502 100644
--- a/src/environment.rs
+++ b/src/environment.rs
@@ -26,7 +26,7 @@ use rattler_conda_types::{
 };
 use rattler_networking::AuthenticatedClient;
 use rattler_repodata_gateway::sparse::SparseRepoData;
-use rattler_solve::{LibsolvRepoData, SolverBackend};
+use rattler_solve::{libsolv_sys, SolverImpl};
 use std::collections::HashMap;
 use std::{
     collections::{HashSet, VecDeque},
@@ -329,9 +329,7 @@ pub async fn update_lock_file(
         // Construct a solver task that we can start solving.
         let task = rattler_solve::SolverTask {
             specs: match_specs.clone(),
-            available_packages: available_packages
-                .iter()
-                .map(|records| LibsolvRepoData::from_records(records)),
+            available_packages: &available_packages,
 
             // TODO: All these things.
             locked_packages: existing_lock_file
@@ -343,7 +341,7 @@ pub async fn update_lock_file(
         };
 
         // Solve the task
-        let records = rattler_solve::LibsolvBackend.solve(task)?;
+        let records = libsolv_sys::Solver.solve(task)?;
 
         // Update lock file
         let mut locked_packages = LockedPackages::new(platform);
@@ -415,7 +413,7 @@ pub fn get_required_packages(
                     subdir: "".to_string(),
                     timestamp: None,
                     track_features: vec![],
-                    version: Version::from_str(&pkg.version)?,
+                    version: Version::from_str(&pkg.version)?.into(),
                 },
             })
         })
diff --git a/src/project/snapshots/pixi__project__manifest__test__dependency_types.snap b/src/project/snapshots/pixi__project__manifest__test__dependency_types.snap
index bc333aad1..4ea9f5b51 100644
--- a/src/project/snapshots/pixi__project__manifest__test__dependency_types.snap
+++ b/src/project/snapshots/pixi__project__manifest__test__dependency_types.snap
@@ -7,11 +7,8 @@ ProjectManifest {
     project: ProjectMetadata {
         name: "foo",
         version: Version {
-            norm: Some(
-                "0.1.0",
-            ),
-            version: "[[0], [0], [1], [0]]",
-            local: "[]",
+            version: [[0], [0], [1], [0]],
+            local: [],
         },
         description: None,
         authors: [],
@@ -37,11 +34,8 @@ ProjectManifest {
                 Operator(
                     Equals,
                     Version {
-                        norm: Some(
-                            "1.0.0",
-                        ),
-                        version: "[[0], [1], [0], [0]]",
-                        local: "[]",
+                        version: [[0], [1], [0], [0]],
+                        local: [],
                     },
                 ),
             ),
diff --git a/src/project/snapshots/pixi__project__manifest__test__target_specific.snap b/src/project/snapshots/pixi__project__manifest__test__target_specific.snap
index 837d56457..539694d0c 100644
--- a/src/project/snapshots/pixi__project__manifest__test__target_specific.snap
+++ b/src/project/snapshots/pixi__project__manifest__test__target_specific.snap
@@ -7,11 +7,8 @@ ProjectManifest {
     project: ProjectMetadata {
         name: "foo",
         version: Version {
-            norm: Some(
-                "0.1.0",
-            ),
-            version: "[[0], [0], [1], [0]]",
-            local: "[]",
+            version: [[0], [0], [1], [0]],
+            local: [],
         },
         description: None,
         authors: [],
@@ -47,11 +44,8 @@ ProjectManifest {
                         Operator(
                             Equals,
                             Version {
-                                norm: Some(
-                                    "3.4.5",
-                                ),
-                                version: "[[0], [3], [4], [5]]",
-                                local: "[]",
+                                version: [[0], [3], [4], [5]],
+                                local: [],
                             },
                         ),
                     ),
@@ -80,11 +74,8 @@ ProjectManifest {
                         Operator(
                             Equals,
                             Version {
-                                norm: Some(
-                                    "1.2.3",
-                                ),
-                                version: "[[0], [1], [2], [3]]",
-                                local: "[]",
+                                version: [[0], [1], [2], [3]],
+                                local: [],
                             },
                         ),
                     ),
diff --git a/src/project/snapshots/pixi__project__tests__dependency_sets.snap b/src/project/snapshots/pixi__project__tests__dependency_sets.snap
index 204a67abc..5ed94a0ee 100644
--- a/src/project/snapshots/pixi__project__tests__dependency_sets.snap
+++ b/src/project/snapshots/pixi__project__tests__dependency_sets.snap
@@ -9,11 +9,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "1.0",
-                    ),
-                    version: "[[0], [1], [0]]",
-                    local: "[]",
+                    version: [[0], [1], [0]],
+                    local: [],
                 },
             ),
         ),
@@ -31,11 +28,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "2.12",
-                    ),
-                    version: "[[0], [2], [12]]",
-                    local: "[]",
+                    version: [[0], [2], [12]],
+                    local: [],
                 },
             ),
         ),
@@ -53,11 +47,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "1.0",
-                    ),
-                    version: "[[0], [1], [0]]",
-                    local: "[]",
+                    version: [[0], [1], [0]],
+                    local: [],
                 },
             ),
         ),
diff --git a/src/project/snapshots/pixi__project__tests__dependency_target_sets.snap b/src/project/snapshots/pixi__project__tests__dependency_target_sets.snap
index c8b32b69a..81f401f37 100644
--- a/src/project/snapshots/pixi__project__tests__dependency_target_sets.snap
+++ b/src/project/snapshots/pixi__project__tests__dependency_target_sets.snap
@@ -9,11 +9,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "1.0",
-                    ),
-                    version: "[[0], [1], [0]]",
-                    local: "[]",
+                    version: [[0], [1], [0]],
+                    local: [],
                 },
             ),
         ),
@@ -31,11 +28,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "1.0",
-                    ),
-                    version: "[[0], [1], [0]]",
-                    local: "[]",
+                    version: [[0], [1], [0]],
+                    local: [],
                 },
             ),
         ),
@@ -53,11 +47,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "2.12",
-                    ),
-                    version: "[[0], [2], [12]]",
-                    local: "[]",
+                    version: [[0], [2], [12]],
+                    local: [],
                 },
             ),
         ),
@@ -75,11 +66,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "1.0",
-                    ),
-                    version: "[[0], [1], [0]]",
-                    local: "[]",
+                    version: [[0], [1], [0]],
+                    local: [],
                 },
             ),
         ),
@@ -97,11 +85,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "1.0",
-                    ),
-                    version: "[[0], [1], [0]]",
-                    local: "[]",
+                    version: [[0], [1], [0]],
+                    local: [],
                 },
             ),
         ),
@@ -119,11 +104,8 @@ expression: "project.all_dependencies(Platform::Linux64).unwrap()"
             Operator(
                 Equals,
                 Version {
-                    norm: Some(
-                        "1.0",
-                    ),
-                    version: "[[0], [1], [0]]",
-                    local: "[]",
+                    version: [[0], [1], [0]],
+                    local: [],
                 },
             ),
         ),
diff --git a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-64.snap b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-64.snap
index b6fcf3725..600ddc962 100644
--- a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-64.snap
+++ b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-64.snap
@@ -1,5 +1,6 @@
 ---
 source: src/virtual_packages.rs
+assertion_line: 186
 expression: packages
 ---
 [
@@ -7,11 +8,8 @@ expression: packages
     Linux(
         Linux {
             version: Version {
-                norm: Some(
-                    "5.10",
-                ),
-                version: "[[0], [5], [10]]",
-                local: "[]",
+                version: [[0], [5], [10]],
+                local: [],
             },
         },
     ),
@@ -19,11 +17,8 @@ expression: packages
         LibC {
             family: "glibc",
             version: Version {
-                norm: Some(
-                    "2.17",
-                ),
-                version: "[[0], [2], [17]]",
-                local: "[]",
+                version: [[0], [2], [17]],
+                local: [],
             },
         },
     ),
diff --git a/tests/common/package_database.rs b/tests/common/package_database.rs
index 259ee1843..9ebe0a32b 100644
--- a/tests/common/package_database.rs
+++ b/tests/common/package_database.rs
@@ -6,7 +6,8 @@
 
 use itertools::Itertools;
 use rattler_conda_types::{
-    package::ArchiveType, ChannelInfo, PackageRecord, Platform, RepoData, Version,
+    package::ArchiveType, ChannelInfo, PackageRecord, Platform, RepoData,
+    VersionWithSource,
 };
 use std::{collections::HashSet, path::Path};
 
@@ -109,7 +110,7 @@ impl AsRef<PackageRecord> for Package {
 /// A builder for a [`Package`]
 pub struct PackageBuilder {
     name: String,
-    version: Version,
+    version: VersionWithSource,
     build: Option<String>,
     build_number: Option<u64>,
     depends: Vec<String>,

From 10b638c007d5576156797bb42a4364414070d56f Mon Sep 17 00:00:00 2001
From: Bas Zalmstra <zalmstra.bas@gmail.com>
Date: Thu, 6 Jul 2023 10:50:17 +0200
Subject: [PATCH 2/4] fix: fmt

---
 tests/common/package_database.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/common/package_database.rs b/tests/common/package_database.rs
index 9ebe0a32b..541f2d7b1 100644
--- a/tests/common/package_database.rs
+++ b/tests/common/package_database.rs
@@ -6,8 +6,7 @@
 
 use itertools::Itertools;
 use rattler_conda_types::{
-    package::ArchiveType, ChannelInfo, PackageRecord, Platform, RepoData,
-    VersionWithSource,
+    package::ArchiveType, ChannelInfo, PackageRecord, Platform, RepoData, VersionWithSource,
 };
 use std::{collections::HashSet, path::Path};
 

From 5d22002f8a3809b7a760ad0d2036561fdab366fc Mon Sep 17 00:00:00 2001
From: Bas Zalmstra <zalmstra.bas@gmail.com>
Date: Thu, 6 Jul 2023 11:01:46 +0200
Subject: [PATCH 3/4] fix: missing snapshot

---
 ...et_minimal_virtual_packages.linux-aarch64.snap | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-aarch64.snap b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-aarch64.snap
index 75f298ce1..c5019fad8 100644
--- a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-aarch64.snap
+++ b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-aarch64.snap
@@ -1,5 +1,6 @@
 ---
 source: src/virtual_packages.rs
+assertion_line: 186
 expression: packages
 ---
 [
@@ -7,11 +8,8 @@ expression: packages
     Linux(
         Linux {
             version: Version {
-                norm: Some(
-                    "5.10",
-                ),
-                version: "[[0], [5], [10]]",
-                local: "[]",
+                version: [[0], [5], [10]],
+                local: [],
             },
         },
     ),
@@ -19,11 +17,8 @@ expression: packages
         LibC {
             family: "glibc",
             version: Version {
-                norm: Some(
-                    "2.17",
-                ),
-                version: "[[0], [2], [17]]",
-                local: "[]",
+                version: [[0], [2], [17]],
+                local: [],
             },
         },
     ),

From 06be28871014cfd0bbe9f71d47c85c084fed85b2 Mon Sep 17 00:00:00 2001
From: Bas Zalmstra <zalmstra.bas@gmail.com>
Date: Thu, 6 Jul 2023 11:15:32 +0200
Subject: [PATCH 4/4] fix: actually all missing snapshots

---
 ...et_minimal_virtual_packages.linux-ppc64le.snap | 15 +++++----------
 ..._test_get_minimal_virtual_packages.osx-64.snap |  8 +++-----
 ...st_get_minimal_virtual_packages.osx-arm64.snap |  8 +++-----
 3 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-ppc64le.snap b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-ppc64le.snap
index 11d26715f..9ab230f9a 100644
--- a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-ppc64le.snap
+++ b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.linux-ppc64le.snap
@@ -1,5 +1,6 @@
 ---
 source: src/virtual_packages.rs
+assertion_line: 186
 expression: packages
 ---
 [
@@ -7,11 +8,8 @@ expression: packages
     Linux(
         Linux {
             version: Version {
-                norm: Some(
-                    "5.10",
-                ),
-                version: "[[0], [5], [10]]",
-                local: "[]",
+                version: [[0], [5], [10]],
+                local: [],
             },
         },
     ),
@@ -19,11 +17,8 @@ expression: packages
         LibC {
             family: "glibc",
             version: Version {
-                norm: Some(
-                    "2.17",
-                ),
-                version: "[[0], [2], [17]]",
-                local: "[]",
+                version: [[0], [2], [17]],
+                local: [],
             },
         },
     ),
diff --git a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.osx-64.snap b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.osx-64.snap
index a217091e9..b71bcfb0d 100644
--- a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.osx-64.snap
+++ b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.osx-64.snap
@@ -1,5 +1,6 @@
 ---
 source: src/virtual_packages.rs
+assertion_line: 186
 expression: packages
 ---
 [
@@ -12,11 +13,8 @@ expression: packages
     Osx(
         Osx {
             version: Version {
-                norm: Some(
-                    "10.15",
-                ),
-                version: "[[0], [10], [15]]",
-                local: "[]",
+                version: [[0], [10], [15]],
+                local: [],
             },
         },
     ),
diff --git a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.osx-arm64.snap b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.osx-arm64.snap
index 51d6210e1..175d0fdd0 100644
--- a/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.osx-arm64.snap
+++ b/src/snapshots/pixi__virtual_packages__tests__test_get_minimal_virtual_packages.osx-arm64.snap
@@ -1,5 +1,6 @@
 ---
 source: src/virtual_packages.rs
+assertion_line: 186
 expression: packages
 ---
 [
@@ -12,11 +13,8 @@ expression: packages
     Osx(
         Osx {
             version: Version {
-                norm: Some(
-                    "11.0",
-                ),
-                version: "[[0], [11], [0]]",
-                local: "[]",
+                version: [[0], [11], [0]],
+                local: [],
             },
         },
     ),