Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jonathan Kim
    @jonathanekim
    Starting up the google/promises room!
    Anthony Shoumikhin
    @shoumikhin
    thank you for setting this up, Jonathan!
    Soojin Ro
    @nsoojin
    Hello. I've been using Promises for several months now and really love your library. I was looking around to see if I can contribute to this but there aren't any open issues or feature requests. Do you manage issues elsewhere? or is there any help wanted?
    Anthony Shoumikhin
    @shoumikhin
    Hi Soojin, we try to address all issues promptly and the lib has been in production for a while, so many have already been fixed
    We welcome any ideas on bew features and API improvements, as well as pull requests
    Jonathan Kim
    @jonathanekim
    @shoumikhin FYI it looks like Duo is starting to adopt Promises
    Anthony Shoumikhin
    @shoumikhin
    Cool! Happy to help if anything is needed :)
    nateuni
    @nateuni
    Hi @shoumikhin, thanks for replying to me. I made the code changes, but I am still getting that same error: "Unexpected non-void return value in void function"
    Anthony Shoumikhin
    @shoumikhin
    hey @nateuni, i just replied to your issue
    Ghost
    @ghost~5d72f7fad73408ce4fca3ea7
    Fabien Penso
    @penso
    Hi guys, is there anything like tap in PromiseKit to be able to parse an error and rethrow it?
    to avoid encapsulating the whole code into a Promise {} just for that
    Anthony Shoumikhin
    @shoumikhin
    hi @penso, do you mean catch doesn't fit your needs? it's typically placed somewhere at the end of the chain, but can also be used in the middle like here: https://github.com/google/promises/blob/master/Tests/PromisesTests/Promise%2BCatchTests.swift#L211
    afaik, tap in PromiseKit also creates a new promise (https://github.com/mxcl/PromiseKit/blob/aea48ea1855f5d82e2dffa6027afce3aab8f3dd7/Sources/Thenable.swift#L259), or you mean something different?
    Fabien Penso
    @penso
    yeah I want to be able to catch a specific kind of error to run code, then rethrow the error. Looks like catch in the middle of the chain might work. It's work related so I'll try Monday and will let you know, thanks :)
    I don't think I need to create a new promise, I just wanted to catch specific errors before continuing.
    Fabien Penso
    @penso
    Actually I wanted to try to I changed my code and ran my tests, and it works. Thanks @shoumikhin !
    Fabien Penso
    @penso
    (didn't expect any answer here after > 1 year of inactivity)
    Fabien Penso
    @penso
    Another question: https://gist.github.com/penso/276cacdce579fba20b2f7ee9a339a47d ligne 19, using PromiseKit I could use return .value(document) I believe, using return document doesn't work and I have to add Promises.Promise(), why is that?
    Another: if I need run and cast something, using PromiseKit I can do .map { try foobar(); return true }, using Promises I did it with .then {}, like shown at https://gist.github.com/penso/9c695279e4101fed5dc74c969d5399bf ligne 11. Is that the good way?