michaelklishin / welle

An expressive Clojure client for Riak with batteries included
http://clojureriak.info
92 stars 26 forks source link

Why is Validateur a dependency? #14

Closed bluemont closed 11 years ago

bluemont commented 11 years ago

I see that com.novemberain/validateur is a project dependency, but it is not used by Welle internally, right? (I don't see it referred to by any namespaces. I see no use of format-of, valid?, or other Validateur functions either.)

If Validateur isn't used by Welle, why is it a dependency?

michaelklishin commented 11 years ago

Because it is very useful to have and can be excluded.

bluemont commented 11 years ago

I don't see why that is a wise choice. You add a dependency because it might be useful?

aphyr commented 11 years ago

Seems a little odd to me too, to be honest.

michaelklishin commented 11 years ago

In about 1.5 years of Welle history, I've used Validateur virtually everywhere I used Welle. The goal was to add a doc guide on validation, which was before Validateur itself had docs and Clojure had 5 validation libraries available. It is still a good idea to add that guide.

The dependency is harmless. It can be excluded. It is needed by most apps that use database clients. Whether or not it is "wise", it sounds reasonable to me.

michaelklishin commented 11 years ago

Next Welle release will be 2.0 that will have a couple of breaking API changes. Validateur dependency can be dropped, I don't feel strong about it.

bluemont commented 11 years ago

Thanks for keeping the dependency tree minimal. As you pointed out, a developer might choose zero or more validation libraries; being able to do so without having to exclude a dependency is cleaner. If the developer uses a validation library, making the dependency explicit is the convention -- for good reason.

bluemont commented 11 years ago

Updated via https://github.com/michaelklishin/welle/commit/c3925d46cfe3b09f7118821df49c38b3aeceb12b