Skip to content

Commit 848fa0d

Browse files
sshaderConvex, Inc.
authored and
Convex, Inc.
committed
Fix swapped node vs. v8 modules for push_config log (#23942)
* GitOrigin-RevId: 93bf5a2250043a16e28baead92ad14efd89c7258
1 parent 831f54f commit 848fa0d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

crates/local_backend/src/deploy_config.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,16 @@ pub struct ConfigJson {
148148
pub bundled_module_infos: Option<Vec<BundledModuleInfoJson>>,
149149
}
150150

151+
pub struct ConfigStats {
152+
pub num_node_modules: usize,
153+
pub size_node_modules: usize,
154+
pub num_v8_modules: usize,
155+
pub size_v8_modules: usize,
156+
}
157+
151158
static NODE_ENVIRONMENT: &str = "node";
152159
impl ConfigJson {
153-
pub fn stats(&self) -> (usize, usize, usize, usize) {
160+
pub fn stats(&self) -> ConfigStats {
154161
let num_node_modules = self
155162
.modules
156163
.iter()
@@ -175,12 +182,12 @@ impl ConfigJson {
175182
.iter()
176183
.filter(|module| module.environment.as_deref() != Some(NODE_ENVIRONMENT))
177184
.count();
178-
(
185+
ConfigStats {
179186
num_v8_modules,
180187
num_node_modules,
181188
size_v8_modules,
182189
size_node_modules,
183-
)
190+
}
184191
}
185192
}
186193

0 commit comments

Comments
 (0)