Planning Project Migrations to Swift
summary
Migrating to Swift 3 requires concrete choices: there is no stable ABI and generics are not fully stabilized, so expect a +5MB binary penalty and continued runtime churn. Use include graphs (tool: obsid Deep) and emit LLVM call graphs (llvm) to identify isolated vertical slices and decide top‑down versus bottom‑up rewrites. Prepare headers with nullable annotations, NS_ENUM/NS_OPTIONS and swift_name attributes, and plan to write throwaway glue code for C structs, algebraic enums and top‑level functions.
AI-written summary · about
chapters (20)
- 0:00Intro
- 0:35About your presenter (That's me. Steve.)
- 1:09What's in this talk
- 2:36Why migrate now (to Swift 3)?
- 4:22Cost/benefit analysis
- 9:03Top-down & bottom-up Two general forms of project migration
- 9:42Top-down migration
- 11:00Bottom-up migration • Glue code may be necessary Best for projects with
- 14:53Vertical slices: Include graphs
- 16:00Vertical slices: Case study
- 16:58Vertical slices: Call graphs
- 21:04Preparing for migration Heavily annotate your objective-C code with
- 25:42extern consts
- 26:57errors
- 28:00structs, derived enums
- 28:42tuples
- 29:27algebraic enums
- 30:58A Extreme warning! It is not possible to do direct mappings with enums all the time!
- 32:00Glue code (toplevel functions)
- 34:00In closing!
