-
Notifications
You must be signed in to change notification settings - Fork 116
chore: prepare for a rust-nightly
upgrade
#5080
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
base: master
Are you sure you want to change the base?
Conversation
rust-nightly
upgrade
c3e42b2
to
c801962
Compare
@basvandijk in EDIT:
but: using |
4d7f415
to
ecc7414
Compare
bc52c19
to
4980586
Compare
@@ -27,7 +27,7 @@ runs: | |||
- name: Discover `test/bench` changes | |||
if: ${{ inputs.is_fork == 'false' }} | |||
run: | | |||
git diff --no-index $(nix build --print-out-paths .#tests.bench)/share test/bench/ok | patch -p1 -R | |||
git diff --no-index $(nix build --print-out-paths .#tests.bench)/share test/bench/ok | patch -f -u -p1 -R |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because sometimes we got an exit code 1
that messed up the pipeline. -f
fixes that for good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only it doesn't. It is super strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied a band-aid until I understand this: 587d130.
Strange. When I execute the command locally bas@devenv-bas:~/d/motoko/motoko$ git diff --no-index $(nix build --print-out-paths .#tests.bench)/share test/bench/ok | patch -f -u -p1 -R
patching file test/bench/ok/candid-subtype-cost.drun-run.ok
patching file test/bench/ok/heap-32.drun-run.ok
patching file test/bench/ok/heap-64.drun-run.ok
patching file test/bench/ok/palindrome.drun-run.ok
bas@devenv-bas:~/d/motoko/motoko$ echo $?
0
bas@devenv-bas:~/d/motoko/motoko$ git diff
diff --git a/test/bench/ok/candid-subtype-cost.drun-run.ok b/test/bench/ok/candid-subtype-cost.drun-run.ok
index fa8d5cdbd..4eedb5c3c 100644
--- a/test/bench/ok/candid-subtype-cost.drun-run.ok
+++ b/test/bench/ok/candid-subtype-cost.drun-run.ok
@@ -1,4 +1,4 @@
ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101
ingress Completed: Reply: 0x4449444c0000
-debug.print: {cycles = 911_177; heap_bytes = +12_568}
+debug.print: {cycles = 910_817; heap_bytes = +12_568}
ingress Completed: Reply: 0x4449444c0000
diff --git a/test/bench/ok/heap-32.drun-run.ok b/test/bench/ok/heap-32.drun-run.ok
index 5d175041d..20762a59b 100644
--- a/test/bench/ok/heap-32.drun-run.ok
+++ b/test/bench/ok/heap-32.drun-run.ok
@@ -1,5 +1,5 @@
ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101
ingress Completed: Reply: 0x4449444c0000
-debug.print: (50_227, +29_863_068, 723_584_959)
-debug.print: (50_070, +32_992_212, 785_200_311)
+debug.print: (50_227, +29_863_068, 723_584_599)
+debug.print: (50_070, +32_992_212, 785_200_671)
ingress Completed: Reply: 0x4449444c0000
diff --git a/test/bench/ok/heap-64.drun-run.ok b/test/bench/ok/heap-64.drun-run.ok
index d28df15ef..815a4da64 100644
--- a/test/bench/ok/heap-64.drun-run.ok
+++ b/test/bench/ok/heap-64.drun-run.ok
@@ -1,5 +1,5 @@
ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101
ingress Completed: Reply: 0x4449444c0000
-debug.print: (49_965, +47_942_744, 987_908_675)
-debug.print: (49_806, +47_960_000, 996_956_504)
+debug.print: (49_965, +47_942_744, 987_907_181)
+debug.print: (49_806, +47_960_000, 996_956_864)
ingress Completed: Reply: 0x4449444c0000
diff --git a/test/bench/ok/palindrome.drun-run.ok b/test/bench/ok/palindrome.drun-run.ok
index e82e65287..1ee8e5701 100644
--- a/test/bench/ok/palindrome.drun-run.ok
+++ b/test/bench/ok/palindrome.drun-run.ok
@@ -1,7 +1,7 @@
ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101
ingress Completed: Reply: 0x4449444c0000
debug.print: (true, +1_188, 12_573)
-debug.print: (false, +1_188, 11_622)
+debug.print: (false, +1_188, 12_045)
debug.print: (false, +1_188, 12_552)
debug.print: (true, +868, 12_713)
debug.print: (false, +868, 11_176) |
RIght. Same for me (had to change to |
@@ -38,3 +38,48 @@ fn written_length(buffer: &[u8]) -> usize { | |||
} | |||
buffer.len() | |||
} | |||
|
|||
#[no_mangle] | |||
pub fn pow(a: f64, b: f64) -> f64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe later we can short-circuit these to avoid the indirection
@@ -145,7 +145,6 @@ impl Stream { | |||
} | |||
|
|||
/// Ingest a single byte into the stream. | |||
#[inline] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change intentional? Seems unrelated to the rest of the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC a newer rustc complained that it's not possible to inline exported functions.
@@ -1,4 +1,4 @@ | |||
ingress Completed: Reply: 0x4449444c016c01b3c4b1f204680100010a00000000000000000101 | |||
ingress Completed: Reply: 0x4449444c0000 | |||
debug.print: {cycles = 911_177; heap_bytes = +12_568} | |||
debug.print: {cycles = 910_817; heap_bytes = +12_568} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, why does this change cycles? also below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly libm
has an optimisation?
... and to shut up about minor tossups
see comments
4644e46
to
f27f356
Compare
This makes the necessary changes to upgrade
rust-nightly
except actually bumpingrust-nightly
. This makes it easier to do the eventual upgrade later on, and simplifies the debugging as is done in: #5074.