joystream icon indicating copy to clipboard operation
joystream copied to clipboard

No `debug_assert` in prod

Open bedeho opened this issue 2 years ago • 0 comments

Background

We are multiple places in the runtime doing debug_assert on invariants, but this would cause panic if failed

https://doc.rust-lang.org/reference/conditional-compilation.html#debug_assertions

Proposal

  1. For whatever scripts, automated builds or documentation we have about building a node or runtime blob, make sure debug_assert is not included in production builds.
  2. If the distinction between production and non-production builds is not clear in all cases, introduce the distinction.

┆Issue is synchronized with this Asana task by Unito

bedeho avatar Apr 16 '22 10:04 bedeho