EhPanda icon indicating copy to clipboard operation
EhPanda copied to clipboard

Fix most warnings

Open Jimmy-Prime opened this issue 10 months ago • 1 comments

This pr fix all but two warnings before migrating to TCA 1.0.

Most of the warnings are

  • fireAndForget is deprecated
  • Conformance of 'EffectPublisher<Action, Failure>' to 'Publisher' is deprecated

The technique used here is turn methods in client to simple method or async method if it uses promise

For example:

  • Turn (Input) -> Effect<Never> to (Input) -> Void or (Input) async -> Void
  • Turn (Input) -> Effect<Output> to (Input) -> Output or (Input) async -> Output

Then make corresponding changes in reducers


The warnings left are

EhProfileRequest(action: .create, name: "EhPanda").effect.fireAndForget()

// and

extension Request {
    var effect: Effect<Result<Response, AppError>> {
        publisher.receive(on: DispatchQueue.main).catchToEffect()
    }

Jimmy-Prime avatar Apr 20 '24 11:04 Jimmy-Prime

Thank you for your PR again! We really need some contributions these days. (haven't release a update for six months XD)

tatsuz0u avatar May 23 '24 17:05 tatsuz0u