You're right about the possibility of the diamond problem but SwiftPM does initialize and update the submodules in the dependencies: swift-package-manager/GitRepository.swift at main · apple/swift-package-manager · GitHub
You're right about the possibility of the diamond problem but SwiftPM does initialize and update the submodules in the dependencies: swift-package-manager/GitRepository.swift at main · apple/swift-package-manager · GitHub