membraneframework / membrane_core

The core of the Membrane Framework, advanced multimedia processing framework
https://membrane.stream
Apache License 2.0
1.22k stars 35 forks source link

[Unifex] Make `:dirty` macro warn if non-existing function is marked with a dirty scheduler #757

Closed varsill closed 4 months ago

varsill commented 4 months ago

When the user passes a non-existing function name (or a wrong function arity) to the dirty macro in the Unifex's .spec.exs file, nothing happens. The user might be not aware that the function name or arity was misspelled and that the dirty scheduler won't be used, and it might cause strange bugs

Such a problem occurs here: https://github.com/membraneframework/membrane_rtmp_plugin/blob/e1fef39d7328f97b40d74fe05e5e2b80e40b45bc/c_src/membrane_rtmp_plugin/sink/rtmp_sink.spec.exs#L30

where the wrong arity of function passed to the macro makes none of these two functions use dirty scheduler.