Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 21 12:45
    sadjow commented #344
  • Feb 20 17:31
    jswanner commented #141
  • Feb 20 06:15
    lazebny starred dry-rb/dry-types
  • Feb 19 22:35
    solnic commented #141
  • Feb 19 22:32

    solnic on v0.17.0

    (compare)

  • Feb 19 22:32

    solnic on master

    Bump dry-system to 0.17.0 (compare)

  • Feb 19 22:31

    solnic on 141-fix-compat-with-dry-configurable

    Bump dry-system to 0.17.0 (compare)

  • Feb 19 22:31

    dry-bot on master

    [devtools] update changelog.yml… [devtools] sync (compare)

  • Feb 19 22:27

    solnic on 141-fix-compat-with-dry-configurable

    (compare)

  • Feb 19 22:27

    solnic on master

    Fix compatibility with dry-conf… Merge pull request #142 from dr… (compare)

  • Feb 19 22:27
    solnic closed #142
  • Feb 19 22:27
    solnic closed #141
  • Feb 19 22:24
    solnic milestoned #141
  • Feb 19 22:23
    solnic opened #142
  • Feb 19 22:23

    solnic on 141-fix-compat-with-dry-configurable

    Fix compatibility with dry-conf… (compare)

  • Feb 19 21:12
    flash-gordon commented #141
  • Feb 19 20:45
    jswanner opened #141
  • Feb 19 20:45
    jswanner labeled #141
  • Feb 19 17:38
    pmackay starred dry-rb/dry-monads
  • Feb 19 17:18
    tomraithel starred dry-rb/dry-types
Nikita Shilnikov
@flash-gordon
whatever name you like :) Even with AST this would be useful. The only difference is that AST trimming will trim the whole tree, that is erase meta from underlying types as well
@solnic OK, you now can merge this one https://github.com/dry-rb/dry-types/pull/188/files and I will add Type#pristine tomorrow
Piotr Solnica
@solnic
right
we’ll see what makes sense
Nikita Shilnikov
@flash-gordon
and in the next version we'll add AST transformations, this will make Type#pristine better. That's the plan. I think
I also pushed a small fix for Any
Piotr Solnica
@solnic
I saw that, cool
can I release 0.10.1 later today?
Nikita Shilnikov
@flash-gordon
yes
Egor Lynko
@flexoid
Hi guys. I have an issue, this simple line of code leads to huge performance impact in my use case
https://github.com/dry-rb/dry-types/blob/master/lib/dry/types/definition.rb#L67
the thing is, I use dry-validation in pair with reform, and my input is a Reform::Form object, which has quite a lot fields by itself, and also parent form in :parent property (recursively to the root form)
so, input.inspectbecomes quite heavy call, and if the property is validated with maybe, it always firstly tried to convert to NilClass, which runs this routine many many times
Egor Lynko
@flexoid
How do you think, what can be done in this situation? Does this entire approach is efficient enough?
to be more specific, removing that inspect call reduces query execution time from 4s to 0.2s
Alexander Gräfe
@rickenharp
I just ran into the problem with dry-system, that stubbing doesn't work with a finalized container. I was able to rewrite everything so that I didn't need to finalize in the tests, but I'm wondering: How do you handle having tests that do need a finalized container? Do you have two seperate test runs so the finalization doesn't contaminate the unit tests?
Sergey Kukunin
@Kukunin
@flash-gordon is there a chance you could release new dry-struct with my changes?
I'd like to remove monkey patches from my project
Nikita Shilnikov
@flash-gordon
@Kukunin yeah man, thanks for the reminder. I need to test it with rom first. Will do this tonight. Then I'll release 0.2
Sergey Kukunin
@Kukunin
great. thanks!
Nikita Shilnikov
@flash-gordon
Also there is a PR from Gustavo, Need to check it out
Julien Blanchard
@julienXX
Hello is there a way to reject unknown keys with dry-validation?
Piotr Solnica
@solnic
@julienXX it ignores unspecced keys by default
Gustavo Caso
@GustavoCaso
@here I have a Rails app with the typical setup, but everything been auto loaded from the app folder.
Inside the app folder we have a services folder that contain service objects, I was thinking about moving to a container base implementation
Has anyone tried before ? Any advice ?
Nikita Shilnikov
@flash-gordon
@solnic I've released 0.10.2 with a tiny bugfix
Piotr Solnica
@solnic
oh boy :)
Hannes Nevalainen
@kwando
Damn, I wanna do stuff in Elixir but I'm missing dry-validation to much sigh
Piotr Solnica
@solnic
hah yeah, once you start using such a solution it becomes an integral part of your system and the way you think about handling input so…I’m not surprised :)
Nick Sutterer
@apotonick
Hahaha
BTW @solnic I want to make massive changes to Reform so that it's basically just a presenter around dry-v
Piotr Solnica
@solnic
@apotonick let’s talk this through then, I’m working on dry-v + dry-schema 0.11 in May
Nick Sutterer
@apotonick
Yeah, I mean all Reform does in addition to your work is: presentation object, mapping between DB structure and the form object, and, and that's what is underestimated all the time, the deserialization of the incoming document
That's where Representable comes into play
And I think we should also discuss how ROM could do the structural mapping part of Reform, as I am absolutely not interested in repeating what's been done better, before
Pablo Herrero
@pabloh
When using dry-transaction, Is possible to modify the context within a step?
Nikita Shilnikov
@flash-gordon
@pabloh wdym by saying "context"? A transaction just accepts arguments and returns a result, it doesn't have any mutable internal state
Pablo Herrero
@pabloh
Doesn't it keep a context along the way where you can grab values?
Is not possible to store partial results somewhere there to use on subsequent steps?
Nikita Shilnikov
@flash-gordon
you just pass them from one step to another
I use keyword args for passing several values at once
def my_step(value_1: , **rest)
  value_1_transformed = do_something(value_1)
  Right(value_1: value_1_transformed, **rest)
end
@pabloh like this^
Pablo Herrero
@pabloh
So you need to make your result value a hash?
Nikita Shilnikov
@flash-gordon
I use hashes, but it's up to you. You also can define a custom step http://dry-rb.org/gems/dry-transaction/custom-step-adapters/, but this is advanced usage :)
Pablo Herrero
@pabloh
My question is do you have to put a hash besides the actual value in the result to have some kind of context?
Nikita Shilnikov
@flash-gordon
can be arrays also, or you can define your own "context" object
the main point is that dry-transaction doesn't have a mutable state inside
Pablo Herrero
@pabloh
I understand that, I meant "change" the context in the same way the state monad updates its "state".
Nikita Shilnikov
@flash-gordon
yeah, in this sense a new type of step will be useful, atm we don't have any special "context" object