Skip to content

Commit 112af65

Browse files
authored
Bump deps (#67)
* Update all deps Signed-off-by: Oliver Tale-Yazdi <[email protected]> * Bump to 3.4.5 Signed-off-by: Oliver Tale-Yazdi <[email protected]> --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]>
1 parent 2bd53a7 commit 112af65

File tree

10 files changed

+719
-548
lines changed

10 files changed

+719
-548
lines changed

Cargo.lock

Lines changed: 660 additions & 491 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[workspace.package]
22
edition = "2021"
33
authors = ["Oliver Tale-Yazdi <[email protected]>"]
4-
version = "3.4.4"
4+
version = "3.4.5"
55
repository = "https://github.com/ggwpez/substrate-weight-compare"
66
readme = "README.md"
77
keywords = [ "polkadot", "substrate", "blockchain" ]
@@ -18,12 +18,12 @@ members = [
1818
resolver = "2"
1919

2020
[workspace.dependencies]
21-
subweight-core = { version = "3.4.4", path = "core" }
21+
subweight-core = { version = "3.4.5", path = "core" }
2222

23-
clap = { version = "4.5.16", features = ["derive"] }
24-
env_logger = "0.11.5"
25-
log = "0.4.22"
26-
sailfish = { version = "0.8.3" }
23+
clap = { version = "4.5.31", features = ["derive"] }
24+
env_logger = "0.11.6"
25+
log = "0.4.26"
26+
sailfish = { version = "0.9.0" }
2727

2828
[profile.test-release]
2929
inherits = "release"

cli/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ env_logger.workspace = true
1919
log.workspace = true
2020
clap.workspace = true
2121

22-
syn = { version = "2.0.74", features = ["parsing", "full"] }
23-
comfy-table = { version = "7.1.1", default-features = false }
24-
serde = { version = "1.0.208", features = [ "derive" ] }
25-
fancy-regex = "0.13.0"
22+
syn = { version = "2.0.98", features = ["parsing", "full"] }
23+
comfy-table = { version = "7.1.4", default-features = false }
24+
serde = { version = "1.0.218", features = [ "derive" ] }
25+
fancy-regex = "0.14.0"
2626

2727
[dev-dependencies]
2828
assert_cmd = "2.0.16"
29-
serial_test = "3.1.1"
29+
serial_test = "3.2.0"

core/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ bloat = []
3535
clap.workspace = true
3636
log.workspace = true
3737

38-
fancy-regex = "0.13.0"
38+
fancy-regex = "0.14.0"
3939
git-version = "0.3.9"
40-
glob = "0.3.1"
40+
glob = "0.3.2"
4141
lazy_static = "1.5.0"
42-
proc-macro2 = "1.0.86"
43-
semver = "1.0.23"
44-
serde = { version = "1.0.208", features = [ "derive" ] }
45-
serde_json = "1.0.125"
46-
syn = { version = "2.0.74", features = ["parsing", "full"] }
42+
proc-macro2 = "1.0.93"
43+
semver = "1.0.25"
44+
serde = { version = "1.0.218", features = [ "derive" ] }
45+
serde_json = "1.0.139"
46+
syn = { version = "2.0.98", features = ["parsing", "full"] }
4747

4848
[dev-dependencies]
4949
criterion = { version = "0.5", features = [ "html_reports" ] }
50-
rstest = "0.22.0"
51-
serial_test = "3.1.1"
50+
rstest = "0.24.0"
51+
serial_test = "3.2.0"
5252
maplit = "1.0.2"
5353

5454
# Work-around for <https://github.com/rust-lang/cargo/issues/2911>

web/Cargo.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ actix-web = { version = "4.9.0", features = ["openssl"] }
2828
actix-files = "0.6.6"
2929
lazy_static = "1.5.0"
3030
openssl = { version = "0.10", features = ["v110"] }
31-
syn = { version = "2.0.74", features = ["parsing", "full"] }
32-
serde = { version = "1.0.208", features = [ "derive" ] }
31+
syn = { version = "2.0.98", features = ["parsing", "full"] }
32+
serde = { version = "1.0.218", features = [ "derive" ] }
3333
badge-maker = "0.3.1"
34-
dashmap = "6.0.1"
35-
cached = "0.53.1"
36-
fancy-regex = "0.13.0"
34+
dashmap = "6.1.0"
35+
cached = "0.54.0"
36+
fancy-regex = "0.14.0"
3737
html-escape = "0.2.13"
3838

3939
[dev-dependencies]
4040
assert_cmd = "2.0.16"
41-
serial_test = "3.1.1"
42-
reqwest = { version = "0.12.5", default-features = false, features = ["blocking"] }
43-
tempfile = "3.12.0"
44-
rstest = { version = "0.22.0", default-features = false }
41+
serial_test = "3.2.0"
42+
reqwest = { version = "0.12.12", default-features = false, features = ["blocking"] }
43+
tempfile = "3.17.1"
44+
rstest = { version = "0.24.0", default-features = false }

web/templates/compare.stpl

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,37 @@
3131
<td><%- readme_link("Repository") %></td>
3232
<td>
3333
<select id="select_repo">
34-
<% for repo in repos.iter() { %>
35-
<option value=<%= repo %> <%- if &args.repo == repo { "selected" } else { "" } %>><%= repo %></option>
34+
<% for repo in self.repos.iter() { %>
35+
<option value=<%= repo %> <%- if &self.args.repo == repo { "selected" } else { "" } %>><%= repo %></option>
3636
<% } %>
3737
</select>
3838
</td>
3939
</tr>
4040
<tr>
4141
<td>Old Commit/Branch</td>
42-
<td><input id="input_old" type="text" value="<%= args.old %>"></td>
42+
<td><input id="input_old" type="text" value="<%= self.args.old %>"></td>
4343
</tr>
4444
<tr>
4545
<td>New Commit/Branch</td>
46-
<td><input id="input_new" type="text" value="<%= args.new %>"></td>
46+
<td><input id="input_new" type="text" value="<%= self.args.new %>"></td>
4747
</tr>
4848
<tr>
4949
<td><%- readme_link("Path Pattern") %></td>
50-
<td><input id="input_path_pattern" type="text" value="<%= args.path_pattern %>"></td>
50+
<td><input id="input_path_pattern" type="text" value="<%= self.args.path_pattern %>"></td>
5151
</tr>
5252
<tr>
5353
<td><%- readme_link("Pallet") %></td>
54-
<td><input id="input_pallet" type="text" value="<%= args.pallet.clone().unwrap_or_else(|| ".*".into()) %>"></td>
54+
<td><input id="input_pallet" type="text" value="<%= self.args.pallet.clone().unwrap_or_else(|| ".*".into()) %>"></td>
5555
</tr>
5656
<tr>
5757
<td><%- readme_link("Extrinsic") %></td>
58-
<td><input id="input_extrinsic" type="text" value="<%= args.extrinsic.clone().unwrap_or_else(|| ".*".into()) %>"></td>
58+
<td><input id="input_extrinsic" type="text" value="<%= self.args.extrinsic.clone().unwrap_or_else(|| ".*".into()) %>"></td>
5959
</tr>
6060
<tr>
6161
<td><%- readme_link("Rel Threshold") %></td>
6262
<td>
6363
<div class="input-group">
64-
<input id="input_threshold" type="number" class="form-control" value="<%= args.threshold %>">
64+
<input id="input_threshold" type="number" class="form-control" value="<%= self.args.threshold %>">
6565
<div class="input-group-append">
6666
<span class="input-group-text">%</span>
6767
</div>
@@ -73,7 +73,7 @@
7373
<td>
7474
<select id="select_unit">
7575
<% for (val, repr) in subweight_core::Dimension::reflect().iter() { %>
76-
<option value="<%= repr %>" <%- if &args.unit == val { "selected" } else { "" } %>><%= repr %></option>
76+
<option value="<%= repr %>" <%- if &self.args.unit == val { "selected" } else { "" } %>><%= repr %></option>
7777
<% } %>
7878
</select>
7979
</td>
@@ -84,28 +84,28 @@
8484
<td>
8585
<select id="select_method">
8686
<% for (val, repr) in subweight_core::CompareMethod::reflect().iter() { %>
87-
<option value="<%= repr %>" <%- if &args.method == val { "selected" } else { "" } %>><%= repr %></option>
87+
<option value="<%= repr %>" <%- if &self.args.method == val { "selected" } else { "" } %>><%= repr %></option>
8888
<% } %>
8989
</select>
9090
</td>
9191
</tr>
9292
<tr>
9393
<td><%- readme_link("Ignore Errors") %></td>
94-
<td><input id="checkbox_ignore_errors" type="checkbox" <%- if args.ignore_errors { "checked" } else { "" } %>></td>
94+
<td><input id="checkbox_ignore_errors" type="checkbox" <%- if self.args.ignore_errors { "checked" } else { "" } %>></td>
9595
</tr>
9696
<tr>
9797
<td><%- readme_link("Git Pull") %></td>
98-
<td><input id="checkbox_git_pull" type="checkbox" <%- if args.git_pull.unwrap_or(true) { "checked" } else { "" } %>></td>
98+
<td><input id="checkbox_git_pull" type="checkbox" <%- if self.args.git_pull.unwrap_or(true) { "checked" } else { "" } %>></td>
9999
</tr>
100100
<tr>
101101
<td><%- readme_link("Cache") %> hit</td>
102-
<td><%= if was_cached { "Yes" } else { "No" } %></td>
102+
<td><%= if self.was_cached { "Yes" } else { "No" } %></td>
103103
</tr>
104104
</tbody>
105105
</table>
106106
</br>
107107

108-
<% let errors = diff.iter().filter_map(|c| c.error()).collect::<Vec<_>>(); if !errors.is_empty() { %>
108+
<% let errors = self.diff.iter().filter_map(|c| c.error()).collect::<Vec<_>>(); if !errors.is_empty() { %>
109109
<p>
110110
<button class="btn btn-danger" type="button" data-bs-toggle="collapse" data-bs-target="#collapseErrors" aria-expanded="false" aria-controls="collapseErrors">
111111
<%- errors.len() %> errors generated
@@ -120,7 +120,7 @@
120120
</div>
121121
<% } %>
122122

123-
<% let warnings = diff.iter().filter_map(|c| c.warning()).collect::<Vec<_>>(); if !warnings.is_empty() { %>
123+
<% let warnings = self.diff.iter().filter_map(|c| c.warning()).collect::<Vec<_>>(); if !warnings.is_empty() { %>
124124
<p>
125125
<button class="btn btn-warning" type="button" data-bs-toggle="collapse" data-bs-target="#collapseWarns" aria-expanded="false" aria-controls="collapseWarns">
126126
<%- warnings.len() %> warnings generated
@@ -141,8 +141,8 @@
141141
<th>File</th>
142142
<th>Extrinsic</th>
143143

144-
<th>Old [<%= format!("{:?}", args.unit) %>]</th>
145-
<th>New [<%= format!("{:?}", args.unit) %>]</th>
144+
<th>Old [<%= format!("{:?}", self.args.unit) %>]</th>
145+
<th>New [<%= format!("{:?}", self.args.unit) %>]</th>
146146
<th>Rel. Change</th>
147147
<th>Abs. Change</th>
148148

@@ -152,7 +152,7 @@
152152
</tr>
153153
</thead>
154154
<tbody>
155-
<% for (info, change) in diff.iter().filter_map(|c| c.term().map(|t| (c, t))) { %>
155+
<% for (info, change) in self.diff.iter().filter_map(|c| c.term().map(|t| (c, t))) { %>
156156
<tr id=<%- format!("\"{}.{}\"", &info.file, &info.name) %>>
157157
<td>
158158
<%= info.file %>
@@ -169,23 +169,23 @@
169169
</td>
170170

171171
<td data-order='<%- change.old_v.unwrap_or_default() %>'>
172-
<%= change.old_v.map(|t| args.unit.fmt_value(t)).unwrap_or_else(|| "-".into()) %>
172+
<%= change.old_v.map(|t| self.args.unit.fmt_value(t)).unwrap_or_else(|| "-".into()) %>
173173
</td>
174174
<td data-order='<%- change.new_v.unwrap_or_default() %>'>
175-
<%= change.new_v.map(|t| args.unit.fmt_value(t)).unwrap_or_else(|| "-".into()) %>
175+
<%= change.new_v.map(|t| self.args.unit.fmt_value(t)).unwrap_or_else(|| "-".into()) %>
176176
</td>
177177
<td data-order='<%- order_percent(change) %>'>
178178
<%- html_color_percent(change.percent, change.change) %>
179179
</td>
180180
<td data-order='<%- order_abs(change) %>'>
181-
<%- html_color_abs(change, args.unit) %>
181+
<%- html_color_abs(change, self.args.unit) %>
182182
</td>
183183

184184
<td>
185-
<%- change.old.as_ref().map(|t| format!("{} {}", code_link(&args.repo, &organization, &info.name, &info.file, &args.old), t)).unwrap_or_else(|| "-".into()) %>
185+
<%- change.old.as_ref().map(|t| format!("{} {}", code_link(&self.args.repo, &self.organization, &info.name, &info.file, &self.args.old), t)).unwrap_or_else(|| "-".into()) %>
186186
</td>
187187
<td>
188-
<%- change.new.as_ref().map(|t| format!("{} {}", code_link(&args.repo, &organization, &info.name, &info.file, &args.new), t)).unwrap_or_else(|| "-".into()) %>
188+
<%- change.new.as_ref().map(|t| format!("{} {}", code_link(&self.args.repo, &self.organization, &info.name, &info.file, &self.args.new), t)).unwrap_or_else(|| "-".into()) %>
189189
</td>
190190
<td>
191191
<%= format!("{}", &change.scope) %>

web/templates/error.stpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<input class="form-check-input" type="checkbox" id="lightSwitch" />
1313
</div>
1414
<h1>Error</h1>
15-
<h2><%= msg %></h2>
15+
<h2><%= self.msg %></h2>
1616
The query arguments are explained in the <a href="https://github.com/ggwpez/substrate-weight-compare#config-options" target="_blank">README.md</a>.
1717
</br>
1818
<h2>Examples:</h2>

web/templates/merge_requests.stpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
</div>
4848
<div class="col">
4949
Repo: <select id="select_repo">
50-
<% for repo in repos.iter() { %>
50+
<% for repo in self.repos.iter() { %>
5151
<option value=<%= format!("{}:{}", &repo.organization, &repo.name) %>><%= format!("{}:{}", &repo.organization, &repo.name) %></option>
5252
<% } %>
5353
</select>

web/templates/root.stpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
<fieldset>
4141
<div class="form-card">
4242
<h2 class="fs-title">Repository</h2>
43-
<p>Please select a repository. There are <var><%= repos.len() %></var> available.</p>
43+
<p>Please select a repository. There are <var><%= self.repos.len() %></var> available.</p>
4444
<select class="form-control js-example-basic-single" id="repoSelect" style="width: 100%;">
45-
<% for repo in repos { %>
45+
<% for repo in self.repos { %>
4646
<option value="<%= repo.to_lowercase() %>"><%= repo %></option>
4747
<% } %>
4848
</select>

web/tests/swc_web_works.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ fn subweight_web_compare_works() {
7575
"polkadot",
7676
"--static",
7777
"../web/static",
78+
"--port",
79+
"4000",
7880
])
7981
.env("RUST_LOG", "error")
8082
.spawn()
@@ -84,7 +86,7 @@ fn subweight_web_compare_works() {
8486
for _ in 0..20 {
8587
std::thread::sleep(std::time::Duration::from_millis(100));
8688

87-
let url = "http://127.0.0.1:8080/compare?old=v0.9.19&new=v0.9.20&repo=polkadot&threshold=10&unit=weight&path_pattern=runtime/polkadot/src/weights/*.rs&method=base&ignore_errors=false&git_pull=false";
89+
let url = "http://127.0.0.1:4000/compare?old=v0.9.19&new=v0.9.20&repo=polkadot&threshold=10&unit=weight&path_pattern=runtime/polkadot/src/weights/*.rs&method=base&ignore_errors=false&git_pull=false";
8890

8991
let Ok(resp) = reqwest::blocking::get(url).map(|r| r.text().unwrap()) else { continue };
9092

0 commit comments

Comments
 (0)