RxSwiftCommunity / RxSwiftCommunity/RxController

[Swift] Clean up legacy syntax for current Swift compilers

Open
#17 0 comments 0 reactions 0 assignees View on GitHub

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 : class rather than : AnyObject
  • unwrappedValue filters optionals and then force-unwraps them
  • UIKit lifecycle selectors are referenced implicitly

Proposal

Make a no-public-API-change cleanup:

  • use AnyObject for class-only protocols
  • replace filter + force unwrap with compactMap
  • use explicit UIViewController lifecycle 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.