These are chat archives for dry-rb/chat

28th
Aug 2018
Paweł Świątkowski
@katafrakt
Aug 28 2018 12:21
Hello! I'm facing a weird problem with dry-monads (1.0.1) - it seems it does not load properly.
irb(main):001:0> require 'dry-monads'
=> true
irb(main):002:0> Dry::Monads::Result
NameError: uninitialized constant Dry::Monads::Result
    from (irb):2
    from /Users/pawel/.rbenv/versions/2.4.1/bin/irb:11:in `<main>'
irb(main):003:0> Dry::Monads::VERSION
NameError: uninitialized constant Dry::Monads::VERSION
    from (irb):3
    from /Users/pawel/.rbenv/versions/2.4.1/bin/irb:11:in `<main>'
irb(main):004:0> Dry::Monads.constants
=> []
Igor S. Morozov
@Morozzzko
Aug 28 2018 12:22
You have to require each monad explicitly now. If you don’t want to do that, you can just require 'dry/monads/all'
Paweł Świątkowski
@katafrakt
Aug 28 2018 12:23
oh, right, thanks
then the docs are a little outdated, I guess
Igor S. Morozov
@Morozzzko
Aug 28 2018 12:24
Yes, seems so. Could you file an issue or a PR, please?
Paweł Świątkowski
@katafrakt
Aug 28 2018 12:25
Sure. Thanks for your help!
Chris Richards
@cmrichards
Aug 28 2018 16:02
Are people using result objects at the level of domain objects/methods? At the moment, i'm only using them for my outer layer objects, services, etc.
Igor S. Morozov
@Morozzzko
Aug 28 2018 16:45
Yup
Nikita Shilnikov
@flash-gordon
Aug 28 2018 17:40
@katafrakt @Morozzzko I fixed imports :sweat_smile: