G5 / storext

Add type-casting and other features on top of ActiveRecord::Store.store_accessor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace 'Virtus' with 'dry-types' for Coercion

ChristianClassen opened this issue · comments

Hey,

first of all, thanks for writing this great gem!
Are there any plans to replace the 'Virtus' dependency with the much better maintained dry-types coercion engine? (Same creator)
It's even the default coercion backend for the Trailblazer architecture.

Btw, the creator of Virtus explains why he started developing the dry-types gem: Virtus to be abandoned by its creator?

Would love to hear your thoughts about it.

Hello @b2e9f523 - glad you find it useful!

I'm familiar with the Dry gems and use them for other projects. I considered moving but dry-types is not 1.x yet. I'm concerned with breaking changes.

I don't see any reason other than that. It seems the feature set storext needs can be found in dry-types. Perhaps we can keep this open until dry-rb reaches 1.x?

Yes, better wait until dry-types is mature enough to rely on without facing breaking changes.

The time has come 🎉
https://dry-rb.org/news/2019/04/23/dry-types-and-dry-struct-1-0-0-released/

Also, they will release dry-validation and dry-schema 1.0.0 soon, if those might be needed here as well.

That's great!

If anyone wants to take a look at upgrading, please do - I won't be able to do so for a while. All the conversion happens through a proxy object that is created per class that uses Storext.

FYI, virtus 2.0 was just released. It seems that this gem's dependency on it is unbounded, so compatibility could possibly be broken by this major version bump.