RxSwiftCommunity / RxSwiftCommunity/RxController
[Swift] Clean up legacy syntax for current Swift compilers
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 45
- Forks
- 8
- Avg merge
- 2h 44m
- Merged PRs (30d)
- 3
Description
Context
A few source-level patterns predate current Swift style and make compiler-modernization work noisier:
- class-only protocols still use
: classrather than: AnyObject unwrappedValuefilters optionals and then force-unwraps them- UIKit lifecycle selectors are referenced implicitly
Proposal
Make a no-public-API-change cleanup:
- use
AnyObjectfor class-only protocols - replace filter + force unwrap with
compactMap - use explicit
UIViewControllerlifecycle selectors
This should be kept separate from dependency/CI changes so any source-level regression is easy to review.
Acceptance criteria
- Public behavior is unchanged.
- The library builds cleanly with the supported Swift 6 compiler toolchains in Swift 5 language mode.
- Existing lifecycle event forwarding still works.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by searching the source for : class, unwrappedValue, and implicit UIKit lifecycle selectors, then inspect the lifecycle event forwarding entry points. Apply the syntax-only cleanup and build with the supported Swift 6 compiler toolchains in Swift 5 language mode; confirm public behavior and lifecycle forwarding remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100