Log assert_no_alloc failures using the logger

This can now finally be enabled thanks to NIH-log explicitly supporting
reentrant logging.

This finally resolves #30.
This commit is contained in:
Robbert van der Helm
2023-03-01 19:53:36 +01:00
parent e9ac1c9efd
commit 4ee5f13638
2 changed files with 2 additions and 7 deletions

View File

@@ -95,13 +95,7 @@ widestring = "1.0.0-beta.1"
# Used for the `assert_process_allocs` feature. This fork includes support for
# the log crate and printing backtraces on allocation failure so you can trace
# the allocation back to a place in the code.
# TODO: The `log` feature causes would pipe these messages through our logger
# which is great in theory, but if the allocation failure happens as part
# of the logger then this will cause the program to hang indefinitely
# because simplelog gates the log function behind a mutex. At some point
# we should implement our own logger and enable this feature. That way we
# can also use CLAP's logging extension.
assert_no_alloc = { git = "https://github.com/robbert-vdh/rust-assert-no-alloc.git", branch = "nih-plug", features = ["backtrace"], optional = true }
assert_no_alloc = { git = "https://github.com/robbert-vdh/rust-assert-no-alloc.git", branch = "nih-plug", features = ["backtrace", "log"], optional = true }
# Used for the `standalone` feature
# NOTE: OpenGL support is not needed here, but rust-analyzer gets confused when