Swift builds are very verbose
For example, the build step for OrderedCollections looks like this:
[build] [8/540] Building Swift object swift/OrderedCollections.swiftmodule Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/HashTable/_HashTable+Bucket.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/HashTable/_HashTable+BucketIterator.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/HashTable/_HashTable+Constants.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/HashTable/_HashTable+CustomStringConvertible.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/HashTable/_HashTable+Testing.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/HashTable/_HashTable+UnsafeHandle.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/HashTable/_HashTable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/HashTable/_Hashtable+Header.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Codable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+CustomDebugStringConvertible.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+CustomReflectable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+CustomStringConvertible.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Deprecations.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Elements+SubSequence.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Elements.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Equatable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+ExpressibleByDictionaryLiteral.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Hashable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Initializers.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Invariants.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Partial_MutableCollection.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Partial_RangeReplaceableCollection.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Sequence.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary+Values.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedDictionary/OrderedDictionary.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Codable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+CustomDebugStringConvertible.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+CustomReflectable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+CustomStringConvertible.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Diffing.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Equatable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+ExpressibleByArrayLiteral.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Hashable.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Initializers.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Insertions.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Invariants.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Partial_MutableCollection.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Partial_RangeReplaceableCollection.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Partial_SetAlgebra+Basics.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Partial_SetAlgebra+Operations.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Partial_SetAlgebra+Predicates.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+RandomAccessCollection.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+ReserveCapacity.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+SubSequence.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+Testing.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+UnorderedView.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet+UnstableInternals.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/OrderedSet/OrderedSet.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/Utilities/RandomAccessCollection+Offsets.swift.obj Vendor/CMakeFiles/OrderedCollections.dir/__/_deps/swiftcollections-src/Sources/OrderedCollections/Utilities/_UnsafeBitset.swift.obj
The wall of text makes it tricky to spot failures and results in large log files.
We could utilize ninja's description
field to cut down on this: https://ninja-build.org/manual.html#ref_rule . I wrote a little python script to prove this concept and the results were nice. If an error is encountered, the full command is printed, and passing -v
to ninja also prints the full commands.
I'm happy to implement this change myself, but wanted to first check that there's not already some way to configure this (I couldn't find one), evaluate any alternate approaches, and to gather feedback on what the description text should be. Building Swift object <name>.swiftmodule
seems reasonable to me.
Any thoughts @etcwilde?