The project currently has GATTCharacteristic.swift and ATTProtocolDataUnit.swift which contain over 20 types and over 2k LOC, as well as the HCI commands. We need to separate the project into one file per type (with nested types as exception). This source layout will prevent merge conflicts and make the project scalable for rapid development with a larger team, but at the cost of git history. There is also the worry of a limit of number for files, and longer compile times with Xcode and Swift Package Manager, but this approach is cleaner and scalable.
This should not affect the API, but we might need to rename some of the HCI commands since the Swift compiler has issues compiling nested types in extensions across different files based on the order of input files. This bug is not present when Whole Module Optimization is enabled.
The project currently has
GATTCharacteristic.swift
andATTProtocolDataUnit.swift
which contain over 20 types and over 2k LOC, as well as the HCI commands. We need to separate the project into one file per type (with nested types as exception). This source layout will prevent merge conflicts and make the project scalable for rapid development with a larger team, but at the cost of git history. There is also the worry of a limit of number for files, and longer compile times with Xcode and Swift Package Manager, but this approach is cleaner and scalable.This should not affect the API, but we might need to rename some of the HCI commands since the Swift compiler has issues compiling nested types in extensions across different files based on the order of input files. This bug is not present when Whole Module Optimization is enabled.