View | Details | Raw Unified | Return to bug 277811
Collapse All | Expand All

(-)b/finance/hyperswitch/Makefile (+1 lines)
Lines 125-130 CARGO_CRATES= actix-codec-0.5.1 \ Link Here
125
		cargo-platform-0.1.3 \
125
		cargo-platform-0.1.3 \
126
		cargo_metadata-0.14.2 \
126
		cargo_metadata-0.14.2 \
127
		cargo_metadata-0.15.4 \
127
		cargo_metadata-0.15.4 \
128
		cargo_metadata-0.18.1 \
128
		cast-0.3.0 \
129
		cast-0.3.0 \
129
		cc-1.0.83 \
130
		cc-1.0.83 \
130
		cfb-0.7.3 \
131
		cfb-0.7.3 \
(-)b/finance/hyperswitch/distinfo (-1 / +3 lines)
Lines 1-4 Link Here
1
TIMESTAMP = 1708587915
1
TIMESTAMP = 1710940726
2
SHA256 (rust/crates/actix-codec-0.5.1.crate) = 617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8
2
SHA256 (rust/crates/actix-codec-0.5.1.crate) = 617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8
3
SIZE (rust/crates/actix-codec-0.5.1.crate) = 14337
3
SIZE (rust/crates/actix-codec-0.5.1.crate) = 14337
4
SHA256 (rust/crates/actix-cors-0.6.4.crate) = b340e9cfa5b08690aae90fb61beb44e9b06f44fe3d0f93781aaa58cfba86245e
4
SHA256 (rust/crates/actix-cors-0.6.4.crate) = b340e9cfa5b08690aae90fb61beb44e9b06f44fe3d0f93781aaa58cfba86245e
Lines 213-218 SHA256 (rust/crates/cargo_metadata-0.14.2.crate) = 4acbb09d9ee8e23699b9634375c72 Link Here
213
SIZE (rust/crates/cargo_metadata-0.14.2.crate) = 17469
213
SIZE (rust/crates/cargo_metadata-0.14.2.crate) = 17469
214
SHA256 (rust/crates/cargo_metadata-0.15.4.crate) = eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a
214
SHA256 (rust/crates/cargo_metadata-0.15.4.crate) = eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a
215
SIZE (rust/crates/cargo_metadata-0.15.4.crate) = 19993
215
SIZE (rust/crates/cargo_metadata-0.15.4.crate) = 19993
216
SHA256 (rust/crates/cargo_metadata-0.18.1.crate) = 2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037
217
SIZE (rust/crates/cargo_metadata-0.18.1.crate) = 24535
216
SHA256 (rust/crates/cast-0.3.0.crate) = 37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5
218
SHA256 (rust/crates/cast-0.3.0.crate) = 37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5
217
SIZE (rust/crates/cast-0.3.0.crate) = 11452
219
SIZE (rust/crates/cast-0.3.0.crate) = 11452
218
SHA256 (rust/crates/cc-1.0.83.crate) = f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0
220
SHA256 (rust/crates/cc-1.0.83.crate) = f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0
(-)b/finance/hyperswitch/files/patch-rust-1.77.0 (-1 / +110 lines)
Added Link Here
0
- 
1
https://github.com/juspay/hyperswitch/issues/4137
2
https://github.com/juspay/hyperswitch/pull/4139
3
https://github.com/juspay/hyperswitch/commit/8f7d9fbc3a002127e220d8a968a6a4e15796e2fd
4
5
--- Cargo.lock.orig	2024-01-05 07:20:19 UTC
6
+++ Cargo.lock
7
@@ -1455,9 +1455,9 @@ dependencies = [
8
 
9
 [[package]]
10
 name = "cargo_metadata"
11
-version = "0.15.4"
12
+version = "0.18.1"
13
 source = "registry+https://github.com/rust-lang/crates.io-index"
14
-checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a"
15
+checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
16
 dependencies = [
17
  "camino",
18
  "cargo-platform",
19
@@ -5169,7 +5169,7 @@ dependencies = [
20
 name = "router_env"
21
 version = "0.1.0"
22
 dependencies = [
23
- "cargo_metadata 0.15.4",
24
+ "cargo_metadata 0.18.1",
25
  "config",
26
  "error-stack",
27
  "gethostname",
28
--- crates/router_env/Cargo.toml.orig	2024-01-05 07:20:19 UTC
29
+++ crates/router_env/Cargo.toml
30
@@ -8,7 +8,7 @@ readme = "README.md"
31
 license.workspace = true
32
 
33
 [dependencies]
34
-cargo_metadata = "0.15.4"
35
+cargo_metadata = "0.18.1"
36
 config = { version = "0.13.3", features = ["toml"] }
37
 error-stack = "0.3.1"
38
 gethostname = "0.4.3"
39
@@ -34,7 +34,7 @@ vergen = { version = "8.2.1", optional = true, feature
40
 tokio = { version = "1.28.2", features = ["macros", "rt-multi-thread"] }
41
 
42
 [build-dependencies]
43
-cargo_metadata = "0.15.4"
44
+cargo_metadata = "0.18.1"
45
 vergen = { version = "8.2.1", features = ["cargo", "git", "git2", "rustc"], optional = true }
46
 
47
 [features]
48
--- crates/router_env/src/cargo_workspace.rs.orig	2024-01-05 07:20:19 UTC
49
+++ crates/router_env/src/cargo_workspace.rs
50
@@ -14,17 +14,11 @@ pub fn set_cargo_workspace_members_env() {
51
     let metadata = cargo_metadata::MetadataCommand::new()
52
         .exec()
53
         .expect("Failed to obtain cargo metadata");
54
-    let workspace_members = metadata.workspace_members;
55
 
56
-    let workspace_members = workspace_members
57
+    let workspace_members = metadata
58
+        .workspace_packages()
59
         .iter()
60
-        .map(|package_id| {
61
-            package_id
62
-                .repr
63
-                .split_once(' ')
64
-                .expect("Unknown cargo metadata package ID format")
65
-                .0
66
-        })
67
+        .map(|package| package.name.as_str())
68
         .collect::<Vec<_>>()
69
         .join(",");
70
 
71
@@ -35,7 +29,7 @@ pub fn set_cargo_workspace_members_env() {
72
     .expect("Failed to set `CARGO_WORKSPACE_MEMBERS` environment variable");
73
 }
74
 
75
-/// Verify that the cargo metadata workspace members format matches that expected by
76
+/// Verify that the cargo metadata workspace packages format matches that expected by
77
 /// [`set_cargo_workspace_members_env`] to set the `CARGO_WORKSPACE_MEMBERS` environment variable.
78
 ///
79
 /// This function should be typically called within build scripts, before the
80
@@ -43,24 +37,20 @@ pub fn set_cargo_workspace_members_env() {
81
 ///
82
 /// # Panics
83
 ///
84
-/// Panics if running the `cargo metadata` command fails, or if the workspace members package ID
85
-/// format cannot be determined.
86
+/// Panics if running the `cargo metadata` command fails, or if the workspace member package names
87
+/// cannot be determined.
88
 pub fn verify_cargo_metadata_format() {
89
     #[allow(clippy::expect_used)]
90
     let metadata = cargo_metadata::MetadataCommand::new()
91
         .exec()
92
         .expect("Failed to obtain cargo metadata");
93
-    let workspace_members = metadata.workspace_members;
94
 
95
-    let package_id_entry_prefix =
96
-        format!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
97
     assert!(
98
-        workspace_members
99
+        metadata
100
+            .workspace_packages()
101
             .iter()
102
-            .any(|package_id| package_id.repr.starts_with(&package_id_entry_prefix)),
103
-        "Unknown workspace members package ID format. \
104
-         Please run `cargo metadata --format-version=1 | jq '.workspace_members'` and update this \
105
-         build script to match the updated package ID format."
106
+            .any(|package| package.name == env!("CARGO_PKG_NAME")),
107
+        "Unable to determine workspace member package names from `cargo metadata`"
108
     );
109
 }
110
 

Return to bug 277811