Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates our version of SwiftLint, but opts out of one of the new rules because making the required changes: ```diff --- a/Libraries/Connect/Internal/Interceptors/GRPCWebInterceptor.swift +++ b/Libraries/Connect/Internal/Interceptors/GRPCWebInterceptor.swift @@ -260,17 +260,11 @@ extension GRPCWebInterceptor: StreamInterceptor { } } -private struct TrailersDecodingError: Error {} - private extension Trailers { static func fromGRPCHeadersBlock(_ source: Data) throws -> Self { - guard let string = String(data: source, encoding: .utf8) else { - throw TrailersDecodingError() - } - // Decode trailers based on gRPC Web spec: // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md - return string + return String(decoding: source, as: UTF8.self) .split(separator: "\r\n") .reduce(into: Trailers()) { trailers, line in guard let separatorIndex = line.firstIndex(of: ":") else { ``` Caused some tests to fail: ``` FAILED: gRPC-Web Unexpected Responses/HTTPVersion:1/TLS:false/trailers-in-body/unary/multiple-responses: actual error {code: 2 (unknown), message: "RPC response missing status"} does not match expected code 12 (unimplemented) ``` It looks like there was some discussion around this rule being potentially problematic here: realm/SwiftLint#5263 (comment) Signed-off-by: Michael Rebello <[email protected]>
- Loading branch information