Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 22:22
    patrickclery edited #362
  • 22:21
    patrickclery commented #361
  • 22:11
    patrickclery commented #361
  • 22:11
    patrickclery commented #361
  • 15:43
    FioFiyo starred dry-rb/dry-types
  • 11:52
    flash-gordon commented #361
  • 07:09
    unixc3t starred dry-rb/dry-types
  • Oct 22 22:33
    patrickclery commented #361
  • Oct 22 21:12
    D1mon starred dry-rb/dry-matcher
  • Oct 22 15:44
    graudeejs starred dry-rb/dry-container
  • Oct 22 08:41
    esparta commented #366
  • Oct 22 08:39
    flash-gordon commented #366
  • Oct 22 08:39

    flash-gordon on master

    Fix error on Dry::Types::Array#… Merge pull request #366 from es… (compare)

  • Oct 22 08:39
    flash-gordon closed #366
  • Oct 22 08:38
    flash-gordon closed #362
  • Oct 22 08:38
    flash-gordon commented #362
  • Oct 22 08:37
    flash-gordon closed #361
  • Oct 22 08:37
    flash-gordon commented #361
  • Oct 22 07:48

    solnic on master

    Adding missing built-in predica… Merge pull request #65 from esp… Merge branch 'release-1.0' (compare)

  • Oct 22 07:47

    solnic on release-1.0

    Adding missing built-in predica… Merge pull request #65 from esp… (compare)

Mikhail Slyusarev
@mikhailvs
i just dont want to feel bad about what i'm doing... :P
Piotr Solnica
@solnic
it’s gonna be easy to move them to a yaml config when you feel like they make schema defs messy :)
Mikhail Slyusarev
@mikhailvs
i guess my problem is that i'd have to load the file each time i define a schema...
would doing Dry::Validation::Messages.default.merge!(...) one time on app init work?
nvm, doesnt look like theres a merge! implemented
Piotr Solnica
@solnic
Alexander Gräfe
@rickenharp
Is there a way to debug rules in dry-validations? I'm trying to find out what values are actually passed to the rule, but using puts inside the rule leads to +puts+ is not a valid predicate name
Mikhail Slyusarev
@mikhailvs
where in the definition are you using puts?
Alexander Gräfe
@rickenharp
rule(valid_blockname: [:ist_blockname, :name]) do |ist_blockname, name|
  puts ist_blockname
end
Mikhail Slyusarev
@mikhailvs
you should try Kernel.puts
or ::Kernel.puts
Alexander Gräfe
@rickenharp
That works perfectly, thanks!
Alexander Gräfe
@rickenharp
Is it possible to model this in dry-v? first_name and last_name must be filled. Unless blockname is true, in which case first_name must not be filled.
Nikita Shilnikov
@flash-gordon
@solnic I bet this is not :) looking at it
I think before(:all) { load_extension } is a bad approach, should be reworked in the same way as in dry-t
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