Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Luca Guidi
@jodosha
@solnic @flash-gordon probably new dry-logic broke rom-sql build (master) See https://gist.github.com/jodosha/55651fe8033477cba882c2af17ee8c9a.
@solnic I confirm that picking dry-types (master) in Gemfile fixes the problem. :)
Benjamin Klotz
@tak1n

@solnic @flash-gordon just updated dry-v on one of our gems and got the same problem :)

https://gist.github.com/tak1n/79c180ac09fbacbae0f432169798233b

Nikita Shilnikov
@flash-gordon
@tak1n have you tried to update dry-logic as well? And, probably, dry-t, dunno
Benjamin Klotz
@tak1n
gem 'dry-struct', github: 'dry-rb/dry-struct'
gem 'dry-validation', github: 'dry-rb/dry-validation'
gem 'dry-types', github: 'dry-rb/dry-types'
putting this into Gemfile fixes the problem
yea I tried to update everything bundle update and tried it explicitly on some gems bundle update --source dry-validation etc
I mean actually I should just need to update dry-v as I'm just using dry-v (and dry-v uses those other gems internally) :)
Egor Lynko
@flexoid

There's also a WIP feature in dry-validation where you can infer validations from a struct definition. It's been in an experimental phase since a couple of releases but we're gonna make it robust prior 1.0.0. (by @solnic)

Is it possible to use this feature, or at lease try it now?

Piotr Solnica
@solnic
@jodosha yeah I know, I need to update/release types and validation
Luca Guidi
@jodosha
@solnic No worries man. Just wanted you and the rest of the team to be aware of it.
Piotr Solnica
@solnic
hmm folks who want to stay on dry-v/t 0.9/0.8 will have to pin dry-l to 0.3.0
I hope nobody is doing bundle update :laughing:
Piotr Solnica
@solnic
@flash-gordon looks like types/struct are green on CI :)
Nikita Shilnikov
@flash-gordon
@solnic should be :) tbh the changes were small enough
Piotr Solnica
@solnic
@flash-gordon pls merge dry-v pr when it’s green
Nikita Shilnikov
@flash-gordon
k
Kiril Dokh
@dsounded
@solnic What’s about dry-validation ?
is custom validation done for now ?
Piotr Solnica
@solnic
@dsounded wdym?
Kiril Dokh
@dsounded
I mean can I write custom code inside rules ?
Piotr Solnica
@solnic
@dsounded oh sorry, I’ve read it as “gone” :laughing: yes, they are done in master, I’ll push a release today
Kiril Dokh
@dsounded
Wow, glad to hear :)
@flash-gordon WDYT if value_or should be in Try monad as well ?
Kiril Dokh
@dsounded
Also it would be OK to implement Xor monad(right biased Either)
Nikita Shilnikov
@flash-gordon
@dsounded re value_or this would be strange a bit. This means you're silently ignoring exception value which is usually not a good idea
if you really want to do it, you can use my_try.to_maybe.value_or
@dsounded I'll revisit supported monads in a while, when I finish the monads chapter in that haskell book ;)
John Backus
@backus
I might be missing something obvious but is there no way on gitter to just search the dry-rb/chat room?
Nikita Shilnikov
@flash-gordon
@backus I bet you're supposed to love new global search, one field for everything
John Backus
@backus
:'(
But every room in gitter is a software room basically
and I want to search deduplicating schemas
Oh it actually worked alright
Maybe the gitter overlords know better
Nikita Shilnikov
@flash-gordon
haha
Joe Van Dyk
@joevandyk
hm, I just tried using dry-validation and I get an exception when requiring the library
Piotr Solnica
@solnic
@joevandyk hey, sorry about that…it’s my fault, pin dry-logic to 0.3.0 for now. I’ll release new validation/types later today
Joe Van Dyk
@joevandyk
dry-rb/dry-validation#256
ah ok
Piotr Solnica
@solnic
I started release process yesterday and didn’t manage to finish, I’ll do it soooon
Joe Van Dyk
@joevandyk
no worries
Joe Van Dyk
@joevandyk
what does the validation look like for validating an array of strings?
(and then an array of strings that contain valid urls)
Piotr Solnica
@solnic
@joevandyk required(:urls).each(:str?, :url?)
Joe Van Dyk
@joevandyk
ah, nice. what about an validating that there's at least one image in the array?
Piotr Solnica
@solnic
@joevandyk required(:urls).value(min_size?: 1) { each(:str?, :url?) }
unfortunately chaining doesn’t work yet, so you gotta use a block
Piotr Solnica
@solnic
@/all hey folks! dry-validation 0.10.0 dry-types 0.9.0 and the new dry-struct 0.1.0 gems have been just released. Please do read CHANGELOGs on GitHub before upgrading :) More info coming soon on our blog!
Tim Riley
@timriley
woooo solnic nice woooooorrrkkkk :tada:
Joe Van Dyk
@joevandyk
how can I validate in dry-validation that a hash has string keys and string values?