Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress not getting called #50

Open
alexandre-g opened this issue Jan 22, 2019 · 8 comments
Open

Progress not getting called #50

alexandre-g opened this issue Jan 22, 2019 · 8 comments
Labels

Comments

@alexandre-g
Copy link

Hi, struggling with the semantics for progress block

Here are two scenarios:

getFile()
        .then(uploadFile)
        .progress {
            /// Not getting called
        }
getFile()
        .then {
            self.uploadFile(fileUrl: $0)
                    .progress {
                        /// Called OK
                    }
        }

Is this the expected behavior? Or am I doing something wrong in the first case?

Thanks

@NunoAlexandre
Copy link

@alexandre-g it seems like the first case shouldn't compile if uploadFile has a named argument.

What happens if you run this:

getFile()
  .then(self.uploadFile(fileUrl:))
  .progress {
       // is it called?
   }

@alexandre-g
Copy link
Author

@NunoAlexandre Sorry for taking a while to test.

It does compile - from what I've seen it only complains if argument number/type does not match.

I've tried the formatting you suggested and still the same issue. You can test by slightly modifying the testProgress() test by making a version of upload() that takes an argument and trying to call

doSomething()
  .then(upload(url:))
  .progress { p in
    // not getting called
  }.then {
    // gets called
  }

@s4cha
Copy link
Member

s4cha commented Apr 6, 2019

@alexandre-g this does look like a bug indeed.
Could you share the full code involved (if possible) so we can try and debug it ?

@NunoAlexandre Thanks for chiming in 👍

PS: Please excuse the late reply 🙏

@ohthatsjhall
Copy link

I'm experiencing the same behavior. Any update on this? Thanks for looking into it.

@bguidolim
Copy link

+1

@ohthatsjhall
Copy link

🙏

@nanocba
Copy link

nanocba commented Aug 2, 2020

No luck on this? I'm facing the same issue.

@bguidolim
Copy link

Nope. I already moved away from the lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants