ScatterHQ / machinist

A library for constructing finite state machines
Apache License 2.0
57 stars 12 forks source link

make eliot dependency optional #6

Closed exarkun closed 10 years ago

exarkun commented 10 years ago

If the required version of eliot isn't available, just disable logging somehow.

exarkun commented 10 years ago

I've done some refactoring towards this in optional-eliot-6. Unfortunately it's not 100% straightforward due to the (cool but unfamiliar) technique for writing unit tests for Eliot usage. There are quite a few tests that depend on Eliot APIs but which are not only tests for machinist's use of Eliot. I need a convenient idiom for skipping the Eliot parts of these tests but not the other parts, the parts that actually exercise important machinist functionality.

My idea so far is to provide a stub version of validateLogging that is a no-op. I need to play around with that a bit more, we'll see how it goes.