metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.44k stars 204 forks source link

How alpha is pre-alpha? #207

Closed jdormit closed 3 years ago

jdormit commented 4 years ago

Hi! I'm evaluating different schema validation/conformance libraries. My use case is to validate the shape of data coming into an API from client applications, returning useful error messages to the clients. Out of Schema, Spec, and Malli, I like the philosophy and API of Malli the best. But I'm a bit worried about Malli's "pre-alpha" status. Would I be making a mistake choosing to build a production system on Malli in its current form?

rschmukler commented 4 years ago

I'm sure metosin will have better feedback, but I've been using malli for about 6 months across two different projects, including one in production and can share my experiences.

During that time it has undergone one major overhaul for transformer internals and was spurred by functionality that I needed for an application (see #114) which required a bit of refactor. Beyond that most of the changes have been minimal - but they do occur (eg. see the recent #206 PR merge). This is important to consider if you plan on building infrastructure on top of malli (eg. transformers, visitors, etc.)

Also, there are tiny bugs that crop up from time to time (eg. #200 ). Most of these exist within the fringe and aren't too major - but depending on your projects' needs it's something to be aware of.

That being said, there are a few advantages in the youth of malli:

1) The velocity is impressive. Generally things are fixed quite quickly after being reported.

2) The repository is relatively simple to understand and well designed; and the team has been extremely receptive to contributions and bug fixes.

3) It can become better. As you mentioned - if you buy into the philosophy, the repository is actively improving - eg. the recent :string schema enhancement (#205). Again, kudos to @ikitommi and the other maintainers for being so receptive to feedback.

Hopefully some of this helps you make your decision. It's definitely been awesome watching the library continue to take shape over the last six months and I personally do feel comfortable using it production - but I own the project fully and am willing to do a bit of extra maintenance as malli evolves.

jdormit commented 4 years ago

Thanks for the insight @rschmukler! I'm not currently planning to build up any complicated infrastructure around Malli - just basic incoming data validation. Given what you've said, I think I am going to go with Malli for now but keep it contained to a small part of my codebase. Excited to see where the project goes!

@ikitommi / whoever, feel free to close out this issue if there's no more useful conversation to be had. I'm going to keep it open for now in case anyone else has anything to add.

ikitommi commented 4 years ago

Thanks Ryan, both for the kind words and your contributions. Goal is to go post pre-alpha this month as most of the design choices have been discovered and decided already. Last bigger things are #86, #20 and ensuring the small bundle size (#203). There are so many things on the roadmap, but there is always time after pre-alpha to do those.

(Breaking) changes before the release are tracked on the CHANGELOG.

miikka commented 4 years ago

Is the first release really going to be alpha? As said, Malli has seen already quite a bit of production use and since the goal has been to do all the necessary breaking changes before the first release, I assume we're going to have some backwards-compatibility goals afterwards.

Consider clojure.spec. The first version was called alpha and the next version alpha2, but in practice, the first version was 1.0 and the second version is 2.0. What would even be the point of a non-alpha, "production ready" release of clojure.spec at this point?

ikitommi commented 3 years ago

My suggestion:

miikka commented 3 years ago
  • rules for alpha, something like BREAKVER-1

How does your suggestion differ from BREAKVER?

ikitommi commented 3 years ago

looking at my previous comment and the Malli CHANGELOG description, not much. But wanted to give warning that the advanced/extender api can break more, e.g. major changes as it's still alpha.

ikitommi commented 3 years ago

accidentally hit close. Let's keep this open for a while

miikka commented 3 years ago

So you mean that you don't want to bump it to 1.0.0 on major changes?

ikitommi commented 3 years ago

there is a alpha-guide in https://github.com/metosin/malli/pull/272, which will fix this.