8000 Release 1.4.1: Restore unary initializer for HTTPHeaders (#301) · 0111b/swift-nio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

1.4.1

  • 1.4.1
  • 241aed7
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
  • Compare
    Choose a tag to compare
  • 1.4.1
  • 241aed7
  • Compare
    Choose a tag to compare
  • Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@Lukasa Lukasa tagged this 11 Apr 16:55
Motivation:

The Swift compiler seems to get very nervous when variadic inits
are used for types that have constructors with optional values. In
general we're not worried about breaking downstream consumers'
extensions when we update our code, but in this case we break the
ability to conform HTTPHeaders to ExpressibleByDictionaryLiteral,
which is a bit annoying. See https://bugs.swift.org/browse/SR-7415
for more details.

For 1.5.0 we should conform HTTPHeaders ourselves, but until that
time we can restore anyone who was conforming HTTPHeaders to
ExpressibleByDictionaryLiteral by restoring the old unary initializer
and delegating it to the new one. This presents an effect that is
equivalent to the old behaviour, but is new.

As a side note, in general it's a bad idea to conform types that you
do not own to standard library protocols. NIO reserves the right to
add conformances to our types in any Semver Minor release, so having
that conformance in your own code risks breakage without a Semver
Major patch bump. Please be aware.

Modifications:

Restored the unary initializer for HTTPHeaders.

Result:

Less breakage, more happiness.
Assets 2
Loading
0