tikv / fail-rs

Fail points for rust
Apache License 2.0
338 stars 40 forks source link

fail: add a runtime codegen check #38

Closed lucab closed 5 years ago

lucab commented 5 years ago

This adds an helper function which allows consumers to check (at runtime) whether the library was compiled with the (buildtime) failpoints feature, which enables code generation for failpoints.

lucab commented 5 years ago

/cc @BusyJay @overvenus @brson for review.

This enables all consumers to introspect library buildtime configuration in a uniform way (i.e. regardless of feature renaming in case of intermediate consumers). It is mostly sugar for consumers, so feel free to reject if you don't like it.

brson commented 5 years ago

Thanks @lucab