Closed KyeMaloy97 closed 5 years ago
This looks to be due to the Swift 4.2 changes to implicitly unwrapped optionals: https://github.com/apple/swift-evolution/blob/master/proposals/0054-abolish-iuo.md
It seems that although envData
is force-unwrapped, it is now presented as a [String:String]?
in terms of its type, which triggers this warning when applying string interpolation.
I suspect a fix would be to change this to envData: \(self.envData ?? [:])
In
SwiftDataCollector.swift
on line 61, there is a String interpolation warning from the compiler.warning: string interpolation produces a debug description for an optional value; did you mean to make this explicit?
Log.debug("[SwiftDataCollector] envData: \(self.envData)")
Swift Version: 4.1 macOS Version: 10.14 Mojave SwiftMetrics Version: 2.4.0
There were also two notes from the compiler too:
note: use 'String(describing:)' to silence this warning
note: provide a default value to avoid this warning