Then icon indicating copy to clipboard operation
Then copied to clipboard

Progress not getting called

Open alexandre-g opened this issue 5 years ago • 8 comments

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

alexandre-g avatar Jan 22 '19 01:01 alexandre-g

@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?
   }

NunoAlexandre avatar Feb 28 '19 13:02 NunoAlexandre

@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
  }

alexandre-g avatar Mar 18 '19 03:03 alexandre-g

@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 🙏

s4cha avatar Apr 06 '19 13:04 s4cha

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

ohthatsjhall avatar Sep 11 '19 21:09 ohthatsjhall

+1

bguidolim avatar Jan 08 '20 17:01 bguidolim

🙏

ohthatsjhall avatar Mar 18 '20 20:03 ohthatsjhall

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

nanocba avatar Aug 02 '20 03:08 nanocba

Nope. I already moved away from the lib.

bguidolim avatar Aug 02 '20 07:08 bguidolim