TApplencourt / metababel

YAML to Babeltrace 2 Component "compiler-compiler"
2 stars 2 forks source link

[draft] Add conditional-on-push #116

Closed TApplencourt closed 11 months ago

TApplencourt commented 11 months ago

Add a flag to enable callbacks on-push, so 0 overhead when not used.

(the tests passed..., github is drunk)

TApplencourt commented 11 months ago

Todo: Add --disable-event-callbacks

DonAurelio commented 11 months ago

Thanks, Thomas, the PR looks good. One comment more in case you think is relevant.

Consider renaming the flag's name and enabling a list of values. Today we have on_downstream_message we may need another, so we can easily add a new one without modifying the CLI.

--enable-callbacks on_downstream_message, ...

Same for disabling, for instance, the automatic callbacks.

--disable-callbacks on_automatic_message, ...
TApplencourt commented 11 months ago

Oh good point! I think it's a good idea indeed! Let me think more, but i like it!

DonAurelio commented 11 months ago

I think we pushed our changes to the wrong branch. Should we perform the renaming changes in another branch since this branch is for the on_push feature?

TApplencourt commented 11 months ago

Yeah, I got cary away yesterday. I Will create a new branch with easy refactoring.