fix(build): the shipped program checks integer overflow, as the tested one does
The release profile left overflow-checks off, so an integer that overflows wrapped silently in the program that ships and panicked in the build the tests run: the tests were checking a program nobody runs. Money itself is Decimal and goes through the kernel's checked arithmetic; this covers the integers around it (counts, sequence numbers, minor units, lengths). Checked: a release build passes -C overflow-checks=on to the workspace's crates and to their dependencies. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
09a8707e20
commit
724edc61f3
1 file changed
+6
@@ -35,3 +35,9 @@ opt-level = 3
|
||||
# AppImage, .deb and .rpm are not carrying debug tables.
|
||||
[profile.release]
|
||||
strip = "symbols"
|
||||
# The shipped program refuses the way the tested one does. Without this an
|
||||
# integer that overflows wraps silently in a release build and panics in
|
||||
# a test build, so the tests would be checking a program nobody runs.
|
||||
# Money is Decimal and goes through the kernel's checked arithmetic; this
|
||||
# covers the integers around it (counts, sequence numbers, minor units).
|
||||
overflow-checks = true
|
||||
Reference in new issue
Block a user