Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Piotr Solnica
@solnic
required(:admin) { true? | true?.not } == required(:admin) { true? | false? }
we could probably add support for not(true?) though
it’d look better
Russell Edens
@rx
Yes I know, I dug around the specs/code to find the rest. I also found missing predicates from #155.
:+1: on not(true?)
Would you like issues opened on the website for missing doc items?
thx!
Piotr Solnica
@solnic
@rx yes website’s issue tracker is the right place
Russell Edens
@rx
I know you'd like PR's for the missing doc items! :worried:
@solnic will do
@solnic do you have an example of a dry-v 'set' off the top of your head?
Piotr Solnica
@solnic
@rx every time you define more than one key you end up with a set rule
it’s basically a list of rules that must be applied to the same input
Russell Edens
@rx
ok - so they don't really show up in the rules_ast
Piotr Solnica
@solnic
they do
Russell Edens
@rx
alright, looks like I'm missing a spec
Piotr Solnica
@solnic
oh actually we don’t create :set from multiple keys
it’s just an array of individual rules that will be executed
Russell Edens
@rx
@solnic so is there a dry-v schema that will generate a :set rule_ast? (I'm throwing not implemented, so I haven't found it yet.)
Piotr Solnica
@solnic
@rx just ignore it for now
Russell Edens
@rx
ha didn't escape that one
@solnic will do
@solnic thanks for your help!
Wilson Silva
@wilsonsilva
I'm getting a privacy error on Chrome when I try to access https://discuss.dry-rb.org/
Piotr Solnica
@solnic
@wilsonsilva uhm, lemme see
@wilsonsilva green for me
safari ff and chrome
John Backus
@backus
@solnic dry-rb/dry-types#141 is up :)
John Backus
@backus
@solnic I can't remember if we decided on doing anything new in dry-struct land to move away from the constructor_type thing
Do you remember?
In other words, are there other features / blocking changes you are waiting on for dry-struct / dry-types from me or should I dive into trying to resolve duplication for the hash schemas?
John Backus
@backus
Darn time zones
Piotr Solnica
@solnic
Let's leave constructor type for now until we figure out something nicer
John Backus
@backus
kk
So to confirm you're not waiting on any other feature changes for dry-struct?
John Backus
@backus
Ah I guess there is some work to be done with dry-logic being updated?
John Backus
@backus
This message was deleted
It breaks dry-struct at least because it seems like the constrained type doesn't have a #failure method
John Backus
@backus
I might be wrong though because the dependencies on dry-struct might still be out of sync
John Backus
@backus
omg its because of a method_missing thing from the decorator
Boooo
:laughing:
In all seriousness, if method_missing is absolutely necessary then it would be nice to have SOME way of knowing that the failure reason is that a decorated type is not upholding its contract
But better would be to just not use method_missing
John Backus
@backus
Ruby provides nicer tools out of the box for decoration like SimpleDelegator and DelegateClass
also Forwardable
John Backus
@backus
k @solnic I'm not really sure how to update Dry::Struct to work with this dry-logic stuff
Would be faster for you to address I think
John Backus
@backus
Eh ok I think I finally got stuff working