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

Fix most warnings #372

Merged
merged 3 commits into from
May 27, 2024
Merged

Conversation

Jimmy-Prime
Copy link

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()
    }

EhPanda/View/Detail/DetailReducer.swift Outdated Show resolved Hide resolved
EhPanda/View/Detail/DetailReducer.swift Outdated Show resolved Hide resolved
EhPanda/View/Setting/Login/LoginReducer.swift Outdated Show resolved Hide resolved
@tatsuz0u
Copy link
Contributor

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

Copy link
Contributor

@tatsuz0u tatsuz0u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chihchy chihchy merged commit 69f316b into EhPanda-Team:develop May 27, 2024
@Jimmy-Prime Jimmy-Prime deleted the jimmy/fix-most-warnings branch May 28, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants