laserdisc-io/fs2-aws

Pipe method signature prevents changing the Stream effect type

jarrodcodes opened this issue · 4 comments

Hello! I have a requirement to use fs2-aws-s3 within a tracing context. We are using trace4cats and thus our effect type is Kleisli[F, Span[F], *. For most of our use cases, changing to this effect type has been either built in or easy to add. For fs2, we have the option of using the translate method. However, because the public API for fs2-aws-s3 has a method signature of Pipe[F, Byte, ETag] for the methods of uploadFile and uploadFileMultipart, we cannot apply the translate method and thus cannot easily change the effect type.

A few options would be:

  1. add similar methods that return a Stream
  2. add a new s3 object called s3Streams (or similar) with these methods using shared logic
  3. Add an effect translation method, (i.e. mapK)

With any of these options a new effect type can easily be applied for all methods.
Happy to make a PR with whichever option is decided by the maintainers. Thanks for your time.

Hey, sorry for late response.
What option are you personally inclined to? i like option 3

No worries at all!

I agree going with # 3, and so I made a PR: #737.

Looking forward to your input. Thanks!

@jarrodcodes thanks again for the contribution, should we close the issue now?

Yes, thank you!