These are chat archives for dry-rb/chat

Oct 2017
Hélio Costa e Silva
Oct 16 2017 11:48

@hlegius there's an experimental feature called 'type specs' (which will be default behavior in 1.0.0)

Thanks, Solnic! But I got a little confused: is the current version automatically coerces right after form validation and the idea is to explicitly enable it with a configuration?

Markus Unterwaditzer
Oct 16 2017 16:43
I want a shortcut to self.class.dry_initializer.attributes(self) from within my initializer. I was thinking of making my own initializer module that would extend Dry::Initializer. Is this someething that is supported, or is there another way?
Markus Unterwaditzer
Oct 16 2017 17:02
@flash-gordon BTW, quite a bunch of days ago you asked me to file an issue for proposing that should only run the validations/coercions on the updated attributes/the changeset. I figured that this would be quite a lot of work for what seems to be a microoptimization
You'd have to build a separate validation path besides the normal methods for creating a struct, but if you pass the right types, validation should be quite fast... if it isn't, that seems more effective to optimize for
Nikita Shilnikov
Oct 16 2017 17:11
Depending on the circumstances it may be not that fast, e.g. if you have a lot of attrs in a struct. Although I agree it’s kinda microoptimization, it can give a significant boost when you’re transforming a lot of data. And anyway, having an issue open doesn’t mean we’re gonna close it asap :)
Pavel Argentov
Oct 16 2017 21:28
Hi all. Is there any progress on dry-rb/dry-validation#368
Tim Riley
Oct 16 2017 22:25
@argent-smith we haven’t been able to work much on dry-validation lately, we’ll get back to it again before too long.